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
dfefd3a3
Commit
dfefd3a3
authored
Jul 12, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add a test for palette associated with black&white TIFF image.
parent
2b2b8501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
image.c
dlls/gdiplus/tests/image.c
+48
-0
No files found.
dlls/gdiplus/tests/image.c
View file @
dfefd3a3
...
...
@@ -3295,6 +3295,53 @@ static void test_GdipGetAllPropertyItems(void)
GdipDisposeImage
(
image
);
}
static
void
test_tiff_palette
(
void
)
{
GpStatus
status
;
GpImage
*
image
;
PixelFormat
format
;
INT
size
;
struct
{
ColorPalette
pal
;
ARGB
entry
[
256
];
}
palette
;
/* 1bpp TIFF without palette */
image
=
load_image
((
const
BYTE
*
)
&
TIFF_data
,
sizeof
(
TIFF_data
));
ok
(
image
!=
0
,
"Failed to load TIFF image data
\n
"
);
if
(
!
image
)
return
;
status
=
GdipGetImagePixelFormat
(
image
,
&
format
);
expect
(
Ok
,
status
);
todo_wine
ok
(
format
==
PixelFormat1bppIndexed
,
"expected PixelFormat1bppIndexed, got %#x
\n
"
,
format
);
status
=
GdipGetImagePaletteSize
(
image
,
&
size
);
ok
(
status
==
Ok
||
broken
(
status
==
GenericError
),
/* XP */
"GdipGetImagePaletteSize error %d
\n
"
,
status
);
if
(
status
==
GenericError
)
{
GdipDisposeImage
(
image
);
return
;
}
todo_wine
expect
(
sizeof
(
ColorPalette
)
+
sizeof
(
ARGB
),
size
);
status
=
GdipGetImagePalette
(
image
,
&
palette
.
pal
,
size
);
expect
(
Ok
,
status
);
expect
(
0
,
palette
.
pal
.
Flags
);
todo_wine
expect
(
2
,
palette
.
pal
.
Count
);
if
(
palette
.
pal
.
Count
==
2
)
{
ok
(
palette
.
pal
.
Entries
[
0
]
==
0xff000000
,
"expected 0xff000000, got %#x
\n
"
,
palette
.
pal
.
Entries
[
0
]);
ok
(
palette
.
pal
.
Entries
[
1
]
==
0xffffffff
,
"expected 0xffffffff, got %#x
\n
"
,
palette
.
pal
.
Entries
[
1
]);
}
GdipDisposeImage
(
image
);
}
START_TEST
(
image
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -3307,6 +3354,7 @@ START_TEST(image)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_tiff_palette
();
test_GdipGetAllPropertyItems
();
test_tiff_properties
();
test_image_properties
();
...
...
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