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
cfdf84b4
Commit
cfdf84b4
authored
Sep 17, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add support for color table sort flag to the GIF decoder.
parent
ec206a84
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
gifformat.c
dlls/windowscodecs/gifformat.c
+2
-1
ungif.c
dlls/windowscodecs/ungif.c
+7
-2
ungif.h
dlls/windowscodecs/ungif.h
+1
-0
No files found.
dlls/windowscodecs/gifformat.c
View file @
cfdf84b4
...
...
@@ -912,7 +912,8 @@ static HRESULT create_IMD_metadata_reader(GifFrameDecode *This, IWICMetadataRead
IMD_data
.
packed
|=
1
<<
7
;
/* local_color_table_size */
IMD_data
.
packed
|=
This
->
frame
->
ImageDesc
.
ColorMap
->
BitsPerPixel
-
1
;
/* FIXME: sort_flag */
/* sort_flag */
IMD_data
.
packed
|=
This
->
frame
->
ImageDesc
.
ColorMap
->
SortFlag
?
0x20
:
0
;
}
stream
=
create_stream
(
&
IMD_data
,
sizeof
(
IMD_data
));
...
...
dlls/windowscodecs/ungif.c
View file @
cfdf84b4
...
...
@@ -272,7 +272,7 @@ FreeSavedImages(GifFileType * GifFile) {
static
int
DGifGetScreenDesc
(
GifFileType
*
GifFile
)
{
int
i
,
BitsPerPixel
;
int
i
,
BitsPerPixel
,
SortFlag
;
GifByteType
Buf
[
3
];
/* Put the screen descriptor into the file: */
...
...
@@ -284,6 +284,7 @@ DGifGetScreenDesc(GifFileType * GifFile) {
return
GIF_ERROR
;
}
GifFile
->
SColorResolution
=
(((
Buf
[
0
]
&
0x70
)
+
1
)
>>
4
)
+
1
;
SortFlag
=
(
Buf
[
0
]
&
0x08
)
!=
0
;
BitsPerPixel
=
(
Buf
[
0
]
&
0x07
)
+
1
;
GifFile
->
SBackGroundColor
=
Buf
[
1
];
GifFile
->
SAspectRatio
=
Buf
[
2
];
...
...
@@ -295,6 +296,7 @@ DGifGetScreenDesc(GifFileType * GifFile) {
}
/* Get the global color map: */
GifFile
->
SColorMap
->
SortFlag
=
SortFlag
;
for
(
i
=
0
;
i
<
GifFile
->
SColorMap
->
ColorCount
;
i
++
)
{
if
(
READ
(
GifFile
,
Buf
,
3
)
!=
3
)
{
FreeMapObject
(
GifFile
->
SColorMap
);
...
...
@@ -353,7 +355,7 @@ DGifGetRecordType(GifFileType * GifFile,
static
int
DGifGetImageDesc
(
GifFileType
*
GifFile
)
{
int
i
,
BitsPerPixel
;
int
i
,
BitsPerPixel
,
SortFlag
;
GifByteType
Buf
[
3
];
GifFilePrivateType
*
Private
=
GifFile
->
Private
;
SavedImage
*
sp
;
...
...
@@ -367,6 +369,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
return
GIF_ERROR
;
}
BitsPerPixel
=
(
Buf
[
0
]
&
0x07
)
+
1
;
SortFlag
=
(
Buf
[
0
]
&
0x20
)
!=
0
;
GifFile
->
Image
.
Interlace
=
(
Buf
[
0
]
&
0x40
);
if
(
Buf
[
0
]
&
0x80
)
{
/* Does this image have local color map? */
...
...
@@ -381,6 +384,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
}
/* Get the image local color map: */
GifFile
->
Image
.
ColorMap
->
SortFlag
=
SortFlag
;
for
(
i
=
0
;
i
<
GifFile
->
Image
.
ColorMap
->
ColorCount
;
i
++
)
{
if
(
READ
(
GifFile
,
Buf
,
3
)
!=
3
)
{
FreeMapObject
(
GifFile
->
Image
.
ColorMap
);
...
...
@@ -417,6 +421,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
if
(
sp
->
ImageDesc
.
ColorMap
==
NULL
)
{
return
GIF_ERROR
;
}
sp
->
ImageDesc
.
ColorMap
->
SortFlag
=
GifFile
->
Image
.
ColorMap
->
SortFlag
;
}
sp
->
RasterBits
=
NULL
;
sp
->
ExtensionBlockCount
=
0
;
...
...
dlls/windowscodecs/ungif.h
View file @
cfdf84b4
...
...
@@ -88,6 +88,7 @@ typedef struct GifColorType {
typedef
struct
ColorMapObject
{
int
ColorCount
;
int
BitsPerPixel
;
int
SortFlag
;
GifColorType
*
Colors
;
}
ColorMapObject
;
...
...
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