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
54a31341
Commit
54a31341
authored
Aug 14, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICBitmap::CopyPixels.
parent
b31b9864
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
bitmap.c
dlls/windowscodecs/bitmap.c
+5
-3
bitmap.c
dlls/windowscodecs/tests/bitmap.c
+3
-3
No files found.
dlls/windowscodecs/bitmap.c
View file @
54a31341
...
@@ -300,9 +300,11 @@ static HRESULT WINAPI BitmapImpl_CopyPalette(IWICBitmap *iface,
...
@@ -300,9 +300,11 @@ static HRESULT WINAPI BitmapImpl_CopyPalette(IWICBitmap *iface,
static
HRESULT
WINAPI
BitmapImpl_CopyPixels
(
IWICBitmap
*
iface
,
static
HRESULT
WINAPI
BitmapImpl_CopyPixels
(
IWICBitmap
*
iface
,
const
WICRect
*
prc
,
UINT
cbStride
,
UINT
cbBufferSize
,
BYTE
*
pbBuffer
)
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
,
static
HRESULT
WINAPI
BitmapImpl_Lock
(
IWICBitmap
*
iface
,
const
WICRect
*
prcLock
,
...
@@ -426,7 +428,7 @@ HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
...
@@ -426,7 +428,7 @@ HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
datasize
=
stride
*
uiHeight
;
datasize
=
stride
*
uiHeight
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BitmapImpl
));
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BitmapImpl
));
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
datasize
);
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
datasize
);
if
(
!
This
||
!
data
)
if
(
!
This
||
!
data
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/windowscodecs/tests/bitmap.c
View file @
54a31341
...
@@ -85,7 +85,7 @@ static void test_createbitmap(void)
...
@@ -85,7 +85,7 @@ static void test_createbitmap(void)
/* pixel data is initially zeroed */
/* pixel data is initially zeroed */
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
9
,
27
,
returned_data
);
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
++
)
for
(
i
=
0
;
i
<
27
;
i
++
)
ok
(
returned_data
[
i
]
==
0
,
"returned_data[%i] == %i
\n
"
,
i
,
returned_data
[
i
]);
ok
(
returned_data
[
i
]
==
0
,
"returned_data[%i] == %i
\n
"
,
i
,
returned_data
[
i
]);
...
@@ -193,10 +193,10 @@ static void test_createbitmap(void)
...
@@ -193,10 +193,10 @@ static void test_createbitmap(void)
/* test that the data we wrote is returned by CopyPixels */
/* test that the data we wrote is returned by CopyPixels */
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
9
,
27
,
returned_data
);
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
++
)
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 */
/* try a valid partial rect, and write mode */
rc
.
X
=
2
;
rc
.
X
=
2
;
...
...
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