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
5870431a
Commit
5870431a
authored
Aug 24, 2017
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Force conversion of 8 bpp grayscale PNG images to 32 bpp BGRA.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc49c40f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
image.c
dlls/gdiplus/image.c
+31
-1
image.c
dlls/gdiplus/tests/image.c
+0
-1
No files found.
dlls/gdiplus/image.c
View file @
5870431a
...
...
@@ -3961,7 +3961,37 @@ static GpStatus decode_image_jpeg(IStream* stream, GpImage **image)
static
GpStatus
decode_image_png
(
IStream
*
stream
,
GpImage
**
image
)
{
return
decode_image_wic
(
stream
,
&
GUID_ContainerFormatPng
,
png_metadata_reader
,
image
);
IWICBitmapDecoder
*
decoder
;
IWICBitmapFrameDecode
*
frame
;
GpStatus
status
;
HRESULT
hr
;
GUID
format
;
BOOL
force_conversion
=
FALSE
;
status
=
initialize_decoder_wic
(
stream
,
&
GUID_ContainerFormatPng
,
&
decoder
);
if
(
status
!=
Ok
)
return
status
;
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
0
,
&
frame
);
if
(
hr
==
S_OK
)
{
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
if
(
hr
==
S_OK
)
{
if
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppGray
))
force_conversion
=
TRUE
;
status
=
decode_frame_wic
(
decoder
,
force_conversion
,
0
,
png_metadata_reader
,
image
);
}
else
status
=
hresult_to_status
(
hr
);
IWICBitmapFrameDecode_Release
(
frame
);
}
else
status
=
hresult_to_status
(
hr
);
IWICBitmapDecoder_Release
(
decoder
);
return
status
;
}
static
GpStatus
decode_image_gif
(
IStream
*
stream
,
GpImage
**
image
)
...
...
dlls/gdiplus/tests/image.c
View file @
5870431a
...
...
@@ -5014,7 +5014,6 @@ static void test_png_color_formats(void)
status
=
GdipGetImagePixelFormat
(
image
,
&
format
);
expect
(
Ok
,
status
);
todo_wine_if
(
td
[
i
].
bit_depth
==
8
&&
td
[
i
].
color_type
==
0
)
ok
(
format
==
td
[
i
].
format
||
broken
(
td
[
i
].
bit_depth
==
1
&&
td
[
i
].
color_type
==
0
&&
format
==
PixelFormat32bppARGB
),
/* XP */
"%d: expected %#x, got %#x
\n
"
,
i
,
td
[
i
].
format
,
format
);
...
...
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