Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6d1a13a7
Commit
6d1a13a7
authored
Jul 13, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Test pixel format of the loaded TIFF image.
parent
b82023b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
tiffformat.c
dlls/windowscodecs/tests/tiffformat.c
+19
-0
No files found.
dlls/windowscodecs/tests/tiffformat.c
View file @
6d1a13a7
...
...
@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
...
...
@@ -93,6 +94,18 @@ static const struct tiff_1bpp_data
};
#include "poppack.h"
static
const
char
*
debugstr_guid
(
const
GUID
*
guid
)
{
static
char
buf
[
50
];
if
(
!
guid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buf
;
}
static
IWICBitmapDecoder
*
create_decoder
(
IWICImagingFactory
*
factory
,
const
void
*
image_data
,
UINT
image_size
)
{
...
...
@@ -130,6 +143,7 @@ static void test_tiff_palette(void)
IWICBitmapDecoder
*
decoder
;
IWICBitmapFrameDecode
*
frame
;
IWICPalette
*
palette
;
GUID
format
;
hr
=
CoCreateInstance
(
&
CLSID_WICImagingFactory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICImagingFactory
,
(
void
**
)
&
factory
);
...
...
@@ -141,6 +155,11 @@ static void test_tiff_palette(void)
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
0
,
&
frame
);
ok
(
hr
==
S_OK
,
"GetFrame error %#x
\n
"
,
hr
);
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormatBlackWhite
),
"got wrong format %s
\n
"
,
debugstr_guid
(
&
format
));
hr
=
IWICImagingFactory_CreatePalette
(
factory
,
&
palette
);
ok
(
hr
==
S_OK
,
"CreatePalette error %#x
\n
"
,
hr
);
hr
=
IWICBitmapFrameDecode_CopyPalette
(
frame
,
palette
);
...
...
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