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
01ab797b
Commit
01ab797b
authored
Jan 09, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add a test for loading a .bmp file with BITMAPINFOHEADER.
parent
af59e6f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
bmpformat.c
dlls/windowscodecs/tests/bmpformat.c
+22
-7
wincodec.idl
include/wincodec.idl
+1
-0
No files found.
dlls/windowscodecs/tests/bmpformat.c
View file @
01ab797b
...
...
@@ -31,15 +31,21 @@
static
const
char
testbmp_24bpp
[]
=
{
/* BITMAPFILEHEADER */
66
,
77
,
/* "BM" */
50
,
0
,
0
,
0
,
/* file size */
78
,
0
,
0
,
0
,
/* file size */
0
,
0
,
0
,
0
,
/* reserved */
26
,
0
,
0
,
0
,
/* offset to bits */
/* BITMAP
CORE
HEADER */
12
,
0
,
0
,
0
,
/* header size */
2
,
0
,
/* width */
3
,
0
,
/* height */
54
,
0
,
0
,
0
,
/* offset to bits */
/* BITMAP
INFO
HEADER */
40
,
0
,
0
,
0
,
/* header size */
2
,
0
,
0
,
0
,
/* width */
3
,
0
,
0
,
0
,
/* height */
1
,
0
,
/* planes */
24
,
0
,
/* bit count */
0
,
0
,
0
,
0
,
/* compression */
0
,
0
,
0
,
0
,
/* image size */
0x74
,
0x12
,
0
,
0
,
/* X pels per meter => 120 dpi */
0
,
0
,
0
,
0
,
/* Y pels per meter */
0
,
0
,
0
,
0
,
/* colors used */
0
,
0
,
0
,
0
,
/* colors important */
/* bits */
0
,
0
,
0
,
0
,
255
,
0
,
0
,
0
,
255
,
0
,
0
,
255
,
255
,
0
,
0
,
0
,
...
...
@@ -86,7 +92,14 @@ static void test_decode_24bpp(void)
if
(
SUCCEEDED
(
hr
))
{
hr
=
IWICBitmapDecoder_Initialize
(
decoder
,
bmpstream
,
WICDecodeMetadataCacheOnLoad
);
ok
(
hr
==
S_OK
,
"Initialize failed, hr=%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
WINCODEC_ERR_BADIMAGE
)
/* XP */
,
"Initialize failed, hr=%x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
win_skip
(
"BMP decoder failed to initialize
\n
"
);
GlobalFree
(
hbmpdata
);
IWICBitmapDecoder_Release
(
decoder
);
return
;
}
hr
=
IWICBitmapDecoder_GetContainerFormat
(
decoder
,
&
guidresult
);
ok
(
SUCCEEDED
(
hr
),
"GetContainerFormat failed, hr=%x
\n
"
,
hr
);
...
...
@@ -125,7 +138,9 @@ static void test_decode_24bpp(void)
hr
=
IWICBitmapFrameDecode_GetResolution
(
framedecode
,
&
dpiX
,
&
dpiY
);
ok
(
SUCCEEDED
(
hr
),
"GetResolution failed, hr=%x
\n
"
,
hr
);
todo_wine
ok
(
dpiX
==
96
.
0
,
"expected dpiX=96.0, got %f
\n
"
,
dpiX
);
todo_wine
ok
(
dpiY
==
96
.
0
,
"expected dpiY=96.0, got %f
\n
"
,
dpiY
);
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
framedecode
,
&
guidresult
);
...
...
include/wincodec.idl
View file @
01ab797b
...
...
@@ -213,6 +213,7 @@ cpp_quote("#define WINCODEC_ERR_PROPERTYNOTFOUND 0x88982f40")
cpp_quote
(
"#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44"
)
cpp_quote
(
"#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45"
)
cpp_quote
(
"#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50"
)
cpp_quote
(
"#define WINCODEC_ERR_BADIMAGE 0x88982f60"
)
cpp_quote
(
"#define WINCODEC_ERR_FRAMEMISSING 0x88982f62"
)
cpp_quote
(
"#define WINCODEC_ERR_BADMETADATAHEADER 0x88982f63"
)
cpp_quote
(
"#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80"
)
...
...
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