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
bf4a2ba2
Commit
bf4a2ba2
authored
Jun 15, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add support for reading png cHRM chunks.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2e16630a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
image.c
dlls/gdiplus/image.c
+52
-1
No files found.
dlls/gdiplus/image.c
View file @
bf4a2ba2
...
...
@@ -3483,7 +3483,7 @@ static void png_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
{
"Source"
,
PropertyTagEquipModel
},
{
"Comment"
,
PropertyTagExifUserComment
},
};
BOOL
seen_gamma
=
FALSE
;
BOOL
seen_gamma
=
FALSE
,
seen_whitepoint
=
FALSE
,
seen_chrm
=
FALSE
;
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
active_frame
,
&
frame
);
if
(
hr
!=
S_OK
)
return
;
...
...
@@ -3552,6 +3552,57 @@ static void png_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
}
}
}
else
if
(
SUCCEEDED
(
hr
)
&&
IsEqualGUID
(
&
GUID_MetadataFormatChunkcHRM
,
&
format
))
{
PropertyItem
*
item
;
if
(
!
seen_whitepoint
)
{
item
=
GdipAlloc
(
sizeof
(
PropertyItem
)
+
sizeof
(
ULONG
)
*
4
);
if
(
item
)
{
ULONG
*
rational
;
item
->
length
=
sizeof
(
ULONG
)
*
4
;
item
->
type
=
PropertyTagTypeRational
;
item
->
id
=
PropertyTagWhitePoint
;
rational
=
item
->
value
=
item
+
1
;
rational
[
0
]
=
get_ulong_by_index
(
reader
,
0
);
rational
[
1
]
=
100000
;
rational
[
2
]
=
get_ulong_by_index
(
reader
,
1
);
rational
[
3
]
=
100000
;
add_property
(
bitmap
,
item
);
seen_whitepoint
=
TRUE
;
GdipFree
(
item
);
}
}
if
(
!
seen_chrm
)
{
item
=
GdipAlloc
(
sizeof
(
PropertyItem
)
+
sizeof
(
ULONG
)
*
12
);
if
(
item
)
{
ULONG
*
rational
;
item
->
length
=
sizeof
(
ULONG
)
*
12
;
item
->
type
=
PropertyTagTypeRational
;
item
->
id
=
PropertyTagPrimaryChromaticities
;
rational
=
item
->
value
=
item
+
1
;
rational
[
0
]
=
get_ulong_by_index
(
reader
,
2
);
rational
[
1
]
=
100000
;
rational
[
2
]
=
get_ulong_by_index
(
reader
,
3
);
rational
[
3
]
=
100000
;
rational
[
4
]
=
get_ulong_by_index
(
reader
,
4
);
rational
[
5
]
=
100000
;
rational
[
6
]
=
get_ulong_by_index
(
reader
,
5
);
rational
[
7
]
=
100000
;
rational
[
8
]
=
get_ulong_by_index
(
reader
,
6
);
rational
[
9
]
=
100000
;
rational
[
10
]
=
get_ulong_by_index
(
reader
,
7
);
rational
[
11
]
=
100000
;
add_property
(
bitmap
,
item
);
seen_chrm
=
TRUE
;
GdipFree
(
item
);
}
}
}
IWICMetadataReader_Release
(
reader
);
}
...
...
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