Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robin Kertels
wine
Commits
54a31341
Commit
54a31341
authored
12 years ago
by
Esme Povirk
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
windowscodecs: Implement IWICBitmap::CopyPixels.
parent
b31b9864
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/windowscodecs/bitmap.c
+5
-3
5 additions, 3 deletions
dlls/windowscodecs/bitmap.c
dlls/windowscodecs/tests/bitmap.c
+3
-3
3 additions, 3 deletions
dlls/windowscodecs/tests/bitmap.c
with
8 additions
and
6 deletions
dlls/windowscodecs/bitmap.c
+
5
−
3
View file @
54a31341
...
...
@@ -300,9 +300,11 @@ static HRESULT WINAPI BitmapImpl_CopyPalette(IWICBitmap *iface,
static
HRESULT
WINAPI
BitmapImpl_CopyPixels
(
IWICBitmap
*
iface
,
const
WICRect
*
prc
,
UINT
cbStride
,
UINT
cbBufferSize
,
BYTE
*
pbBuffer
)
{
FIXME
(
"(%p,%p,%u,%u,%p)
\n
"
,
iface
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
BitmapImpl
*
This
=
impl_from_IWICBitmap
(
iface
);
TRACE
(
"(%p,%p,%u,%u,%p)
\n
"
,
iface
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
return
E_NOTIMPL
;
return
copy_pixels
(
This
->
bpp
,
This
->
data
,
This
->
width
,
This
->
height
,
This
->
stride
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
}
static
HRESULT
WINAPI
BitmapImpl_Lock
(
IWICBitmap
*
iface
,
const
WICRect
*
prcLock
,
...
...
@@ -426,7 +428,7 @@ HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
datasize
=
stride
*
uiHeight
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BitmapImpl
));
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
datasize
);
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
datasize
);
if
(
!
This
||
!
data
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
This diff is collapsed.
Click to expand it.
dlls/windowscodecs/tests/bitmap.c
+
3
−
3
View file @
54a31341
...
...
@@ -85,7 +85,7 @@ static void test_createbitmap(void)
/* pixel data is initially zeroed */
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
9
,
27
,
returned_data
);
todo_wine
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels failed hr=%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels failed hr=%x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
27
;
i
++
)
ok
(
returned_data
[
i
]
==
0
,
"returned_data[%i] == %i
\n
"
,
i
,
returned_data
[
i
]);
...
...
@@ -193,10 +193,10 @@ static void test_createbitmap(void)
/* test that the data we wrote is returned by CopyPixels */
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
9
,
27
,
returned_data
);
todo_wine
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels failed hr=%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels failed hr=%x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
27
;
i
++
)
todo_wine
ok
(
returned_data
[
i
]
==
bitmap_data
[
i
],
"returned_data[%i] == %i
\n
"
,
i
,
returned_data
[
i
]);
ok
(
returned_data
[
i
]
==
bitmap_data
[
i
],
"returned_data[%i] == %i
\n
"
,
i
,
returned_data
[
i
]);
/* try a valid partial rect, and write mode */
rc
.
X
=
2
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment