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
f8703910
Commit
f8703910
authored
Dec 26, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Test the ability to load WMF images.
parent
eb447712
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
image.c
dlls/gdiplus/tests/image.c
+20
-4
No files found.
dlls/gdiplus/tests/image.c
View file @
f8703910
...
...
@@ -64,7 +64,7 @@ static void test_bufferrawformat(void* buff, int size, REFGUID expected, int lin
LPBYTE
data
;
HRESULT
hres
;
GpStatus
stat
;
Gp
Bitmap
*
bmp
;
Gp
Image
*
img
;
hglob
=
GlobalAlloc
(
0
,
size
);
data
=
GlobalLock
(
hglob
);
...
...
@@ -75,16 +75,16 @@ static void test_bufferrawformat(void* buff, int size, REFGUID expected, int lin
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Failed to create a stream
\n
"
);
if
(
hres
!=
S_OK
)
return
;
stat
=
Gdip
CreateBitmapFromStream
(
stream
,
&
bmp
);
stat
=
Gdip
LoadImageFromStream
(
stream
,
&
img
);
ok_
(
__FILE__
,
line
)(
stat
==
Ok
,
"Failed to create a Bitmap
\n
"
);
if
(
stat
!=
Ok
){
IStream_Release
(
stream
);
return
;
}
expect_rawformat
(
expected
,
(
GpImage
*
)
bmp
,
line
,
todo
);
expect_rawformat
(
expected
,
img
,
line
,
todo
);
GdipDisposeImage
(
(
GpImage
*
)
bmp
);
GdipDisposeImage
(
img
);
IStream_Release
(
stream
);
}
...
...
@@ -780,12 +780,28 @@ static const unsigned char jpgimage[285] = {
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xda
,
0x00
,
0x0c
,
0x03
,
0x01
,
0x00
,
0x02
,
0x11
,
0x03
,
0x11
,
0x00
,
0x3f
,
0x00
,
0xb2
,
0xc0
,
0x07
,
0xff
,
0xd9
};
/* 320x320 twip wmf */
static
const
unsigned
char
wmfimage
[
180
]
=
{
0xd7
,
0xcd
,
0xc6
,
0x9a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x01
,
0x40
,
0x01
,
0xa0
,
0x05
,
0x00
,
0x00
,
0x00
,
0x00
,
0xb1
,
0x52
,
0x01
,
0x00
,
0x09
,
0x00
,
0x00
,
0x03
,
0x4f
,
0x00
,
0x00
,
0x00
,
0x0f
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x05
,
0x00
,
0x00
,
0x00
,
0x0b
,
0x02
,
0x00
,
0x00
,
0x00
,
0x00
,
0x05
,
0x00
,
0x00
,
0x00
,
0x0c
,
0x02
,
0x40
,
0x01
,
0x40
,
0x01
,
0x04
,
0x00
,
0x00
,
0x00
,
0x02
,
0x01
,
0x01
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0x04
,
0x01
,
0x0d
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0xfa
,
0x02
,
0x05
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0x2d
,
0x01
,
0x00
,
0x00
,
0x07
,
0x00
,
0x00
,
0x00
,
0xfc
,
0x02
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0x2d
,
0x01
,
0x01
,
0x00
,
0x07
,
0x00
,
0x00
,
0x00
,
0xfc
,
0x02
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0x2d
,
0x01
,
0x02
,
0x00
,
0x07
,
0x00
,
0x00
,
0x00
,
0x1b
,
0x04
,
0x40
,
0x01
,
0x40
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0xf0
,
0x01
,
0x00
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0xf0
,
0x01
,
0x01
,
0x00
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
static
void
test_getrawformat
(
void
)
{
test_bufferrawformat
((
void
*
)
pngimage
,
sizeof
(
pngimage
),
&
ImageFormatPNG
,
__LINE__
,
FALSE
);
test_bufferrawformat
((
void
*
)
gifimage
,
sizeof
(
gifimage
),
&
ImageFormatGIF
,
__LINE__
,
FALSE
);
test_bufferrawformat
((
void
*
)
bmpimage
,
sizeof
(
bmpimage
),
&
ImageFormatBMP
,
__LINE__
,
FALSE
);
test_bufferrawformat
((
void
*
)
jpgimage
,
sizeof
(
jpgimage
),
&
ImageFormatJPEG
,
__LINE__
,
FALSE
);
test_bufferrawformat
((
void
*
)
wmfimage
,
sizeof
(
wmfimage
),
&
ImageFormatWMF
,
__LINE__
,
FALSE
);
}
static
void
test_createhbitmap
(
void
)
...
...
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