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
5e3e7304
Commit
5e3e7304
authored
Jan 02, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add test showing CreateBitmapFromMemory copies the data.
parent
0004788e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
bitmap.c
dlls/windowscodecs/tests/bitmap.c
+8
-3
No files found.
dlls/windowscodecs/tests/bitmap.c
View file @
5e3e7304
...
...
@@ -421,10 +421,11 @@ static void test_createbitmapfromsource(void)
static
void
test_CreateBitmapFromMemory
(
void
)
{
BYTE
data3x3
[
27
]
=
{
BYTE
orig_
data3x3
[
27
]
=
{
128
,
128
,
255
,
128
,
128
,
128
,
128
,
255
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
255
,
255
,
255
,
255
,
128
,
128
,
255
,
255
,
255
,
255
,
255
,
255
};
BYTE
data3x3
[
27
];
BYTE
data3x2
[
27
]
=
{
128
,
128
,
255
,
128
,
128
,
128
,
128
,
255
,
128
,
0
,
0
,
0
,
0
,
128
,
128
,
255
,
255
,
255
,
...
...
@@ -434,6 +435,8 @@ static void test_CreateBitmapFromMemory(void)
IWICBitmap
*
bitmap
;
UINT
width
,
height
,
i
;
memcpy
(
data3x3
,
orig_data3x3
,
sizeof
(
data3x3
));
hr
=
IWICImagingFactory_CreateBitmapFromMemory
(
factory
,
3
,
3
,
&
GUID_WICPixelFormat24bppBGR
,
0
,
0
,
NULL
,
&
bitmap
);
todo_wine
...
...
@@ -470,16 +473,18 @@ todo_wine
ok
(
width
==
3
,
"expected 3, got %u
\n
"
,
width
);
ok
(
height
==
3
,
"expected 3, got %u
\n
"
,
height
);
data3x3
[
2
]
=
192
;
memset
(
data
,
0
,
sizeof
(
data
));
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
9
,
sizeof
(
data
),
data
);
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels error %#x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
sizeof
(
data
);
i
++
)
ok
(
data
[
i
]
==
data3x3
[
i
],
"%u: expected %u, got %u
\n
"
,
i
,
data
[
i
],
data3x3
[
i
]);
ok
(
data
[
i
]
==
orig_
data3x3
[
i
],
"%u: expected %u, got %u
\n
"
,
i
,
data
[
i
],
data3x3
[
i
]);
IWICBitmap_Release
(
bitmap
);
hr
=
IWICImagingFactory_CreateBitmapFromMemory
(
factory
,
3
,
2
,
&
GUID_WICPixelFormat24bppBGR
,
13
,
sizeof
(
data3x3
),
data3x3
,
&
bitmap
);
13
,
sizeof
(
orig_data3x3
),
orig_
data3x3
,
&
bitmap
);
ok
(
hr
==
S_OK
,
"IWICImagingFactory_CreateBitmapFromMemory error %#x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
...
...
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