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
a950a054
Commit
a950a054
authored
Sep 25, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add GIF background to the image properties.
parent
3bb4974d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
image.c
dlls/gdiplus/image.c
+18
-1
No files found.
dlls/gdiplus/image.c
View file @
a950a054
...
...
@@ -3195,6 +3195,18 @@ static PropertyItem *get_gif_comment(IWICMetadataReader *reader)
return
comment
;
}
static
PropertyItem
*
get_gif_background
(
IWICMetadataReader
*
reader
)
{
static
const
WCHAR
backgroundW
[]
=
{
'B'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
PropertyItem
*
background
;
background
=
get_property
(
reader
,
&
GUID_MetadataFormatLSD
,
backgroundW
);
if
(
background
)
background
->
id
=
PropertyTagIndexBackground
;
return
background
;
}
static
LONG
get_gif_frame_delay
(
IWICBitmapFrameDecode
*
frame
)
{
static
const
WCHAR
delayW
[]
=
{
'D'
,
'e'
,
'l'
,
'a'
,
'y'
,
0
};
...
...
@@ -3241,7 +3253,7 @@ static void gif_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
IWICMetadataBlockReader
*
block_reader
;
IWICMetadataReader
*
reader
;
UINT
frame_count
,
block_count
,
i
;
PropertyItem
*
delay
=
NULL
,
*
comment
=
NULL
;
PropertyItem
*
delay
=
NULL
,
*
comment
=
NULL
,
*
background
=
NULL
;
IWICBitmapDecoder_GetFrameCount
(
decoder
,
&
frame_count
);
if
(
frame_count
>
1
)
...
...
@@ -3285,6 +3297,9 @@ static void gif_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
if
(
!
comment
)
comment
=
get_gif_comment
(
reader
);
if
(
!
background
)
background
=
get_gif_background
(
reader
);
IWICMetadataReader_Release
(
reader
);
}
}
...
...
@@ -3294,9 +3309,11 @@ static void gif_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
if
(
delay
)
add_property
(
bitmap
,
delay
);
if
(
comment
)
add_property
(
bitmap
,
comment
);
if
(
background
)
add_property
(
bitmap
,
background
);
GdipFree
(
delay
);
GdipFree
(
comment
);
GdipFree
(
background
);
}
typedef
void
(
*
metadata_reader_func
)(
GpBitmap
*
bitmap
,
IWICBitmapDecoder
*
decoder
,
UINT
frame
);
...
...
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