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
8c593bd3
Commit
8c593bd3
authored
Aug 28, 2017
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Set correct color space flags for grayscale images.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
221c04d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
image.c
dlls/gdiplus/image.c
+8
-1
image.c
dlls/gdiplus/tests/image.c
+0
-1
No files found.
dlls/gdiplus/image.c
View file @
8c593bd3
...
...
@@ -3718,7 +3718,14 @@ static GpStatus decode_frame_wic(IWICBitmapDecoder *decoder, BOOL force_conversi
if
(
status
==
Ok
)
{
/* Native GDI+ used to be smarter, but since Win7 it just sets these flags. */
bitmap
->
image
.
flags
|=
ImageFlagsReadOnly
|
ImageFlagsHasRealPixelSize
|
ImageFlagsHasRealDPI
|
ImageFlagsColorSpaceRGB
;
bitmap
->
image
.
flags
|=
ImageFlagsReadOnly
|
ImageFlagsHasRealPixelSize
|
ImageFlagsHasRealDPI
;
if
(
IsEqualGUID
(
&
wic_format
,
&
GUID_WICPixelFormat2bppGray
)
||
IsEqualGUID
(
&
wic_format
,
&
GUID_WICPixelFormat4bppGray
)
||
IsEqualGUID
(
&
wic_format
,
&
GUID_WICPixelFormat8bppGray
)
||
IsEqualGUID
(
&
wic_format
,
&
GUID_WICPixelFormat16bppGray
))
bitmap
->
image
.
flags
|=
ImageFlagsColorSpaceGRAY
;
else
bitmap
->
image
.
flags
|=
ImageFlagsColorSpaceRGB
;
bitmap
->
image
.
frame_count
=
frame_count
;
bitmap
->
image
.
current_frame
=
active_frame
;
bitmap
->
image
.
decoder
=
decoder
;
...
...
dlls/gdiplus/tests/image.c
View file @
8c593bd3
...
...
@@ -5022,7 +5022,6 @@ static void test_png_color_formats(void)
status
=
GdipGetImageFlags
(
image
,
&
flags
);
expect
(
Ok
,
status
);
todo_wine_if
(
td
[
i
].
bit_depth
>
1
&&
td
[
i
].
color_type
==
0
)
ok
((
flags
&
td
[
i
].
flags
)
==
td
[
i
].
flags
||
broken
(
td
[
i
].
bit_depth
==
1
&&
td
[
i
].
color_type
==
0
&&
(
flags
&
ImageFlagsColorSpaceGRAY
)),
/* XP */
"%d: expected %#x, got %#x
\n
"
,
i
,
td
[
i
].
flags
,
flags
);
...
...
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