Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
606ba15a
Commit
606ba15a
authored
May 14, 2020
by
Vincent Povirk
Committed by
Alexandre Julliard
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add tests for image palette size.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8b9cff6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
image.c
dlls/gdiplus/tests/image.c
+22
-5
No files found.
dlls/gdiplus/tests/image.c
View file @
606ba15a
...
...
@@ -3583,20 +3583,22 @@ static void test_image_properties(void)
UINT
prop_size2
;
/* if win7 behaves differently */
UINT
prop_id
;
UINT
prop_id2
;
/* if win7 behaves differently */
INT
palette_size
;
}
td
[]
=
{
{
pngimage
,
sizeof
(
pngimage
),
ImageTypeBitmap
,
4
,
~
0
,
1
,
20
,
0x5110
,
0x132
},
{
jpgimage
,
sizeof
(
jpgimage
),
ImageTypeBitmap
,
2
,
~
0
,
128
,
0
,
0x5090
,
0x5091
},
{
tiffimage
,
sizeof
(
tiffimage
),
ImageTypeBitmap
,
16
,
0
,
4
,
0
,
0xfe
,
0
},
{
bmpimage
,
sizeof
(
bmpimage
),
ImageTypeBitmap
,
0
,
0
,
0
,
0
,
0
,
0
},
{
wmfimage
,
sizeof
(
wmfimage
),
ImageTypeMetafile
,
0
,
0
,
0
,
0
,
0
,
0
}
{
pngimage
,
sizeof
(
pngimage
),
ImageTypeBitmap
,
4
,
~
0
,
1
,
20
,
0x5110
,
0x132
,
12
},
{
jpgimage
,
sizeof
(
jpgimage
),
ImageTypeBitmap
,
2
,
~
0
,
128
,
0
,
0x5090
,
0x5091
,
12
},
{
tiffimage
,
sizeof
(
tiffimage
),
ImageTypeBitmap
,
16
,
0
,
4
,
0
,
0xfe
,
0
,
12
},
{
bmpimage
,
sizeof
(
bmpimage
),
ImageTypeBitmap
,
0
,
0
,
0
,
0
,
0
,
0
,
16
},
{
wmfimage
,
sizeof
(
wmfimage
),
ImageTypeMetafile
,
0
,
0
,
0
,
0
,
0
,
0
,
-
GenericError
}
};
GpStatus
status
;
GpImage
*
image
;
UINT
prop_count
,
prop_size
,
i
;
PROPID
prop_id
[
16
]
=
{
0
};
ImageType
image_type
;
INT
palette_size
;
union
{
PropertyItem
data
;
...
...
@@ -3617,6 +3619,21 @@ static void test_image_properties(void)
ok
(
td
[
i
].
image_type
==
image_type
,
"%u: expected image_type %d, got %d
\n
"
,
i
,
td
[
i
].
image_type
,
image_type
);
palette_size
=
-
1
;
status
=
GdipGetImagePaletteSize
(
image
,
&
palette_size
);
if
(
td
[
i
].
palette_size
>=
0
)
{
ok
(
status
==
Ok
,
"%u: GdipGetImagePaletteSize error %d
\n
"
,
i
,
status
);
ok
(
td
[
i
].
palette_size
==
palette_size
,
"%u: expected palette_size %d, got %d
\n
"
,
i
,
td
[
i
].
palette_size
,
palette_size
);
}
else
{
ok
(
status
==
-
td
[
i
].
palette_size
,
"%u: GdipGetImagePaletteSize returned %d
\n
"
,
i
,
status
);
ok
(
palette_size
==
0
,
"%u: expected palette_size 0, got %d
\n
"
,
i
,
palette_size
);
}
status
=
GdipGetPropertyCount
(
image
,
&
prop_count
);
ok
(
status
==
Ok
,
"%u: GdipGetPropertyCount error %d
\n
"
,
i
,
status
);
todo_wine_if
(
td
[
i
].
image_data
==
pngimage
||
td
[
i
].
image_data
==
jpgimage
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment