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
3738c6b0
Commit
3738c6b0
authored
Jul 19, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Generate global GIF palette even a real one is missing.
parent
f6c73a22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
14 deletions
+26
-14
gifformat.c
dlls/windowscodecs/gifformat.c
+26
-13
gifformat.c
dlls/windowscodecs/tests/gifformat.c
+0
-1
No files found.
dlls/windowscodecs/gifformat.c
View file @
3738c6b0
...
...
@@ -1180,26 +1180,39 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet
GifDecoder
*
This
=
impl_from_IWICBitmapDecoder
(
iface
);
WICColor
colors
[
256
];
ColorMapObject
*
cm
;
int
i
,
trans
;
int
i
,
trans
,
count
;
ExtensionBlock
*
eb
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
palette
);
cm
=
This
->
gif
->
SColorMap
;
if
(
!
cm
)
return
WINCODEC_ERR_FRAMEMISSING
;
if
(
cm
->
ColorCount
>
256
)
if
(
cm
)
{
ERR
(
"GIF contains invalid number of colors: %d
\n
"
,
cm
->
ColorCount
);
return
E_FAIL
;
}
if
(
cm
->
ColorCount
>
256
)
{
ERR
(
"GIF contains invalid number of colors: %d
\n
"
,
cm
->
ColorCount
);
return
E_FAIL
;
}
for
(
i
=
0
;
i
<
cm
->
ColorCount
;
i
++
)
for
(
i
=
0
;
i
<
cm
->
ColorCount
;
i
++
)
{
colors
[
i
]
=
0xff000000
|
/* alpha */
cm
->
Colors
[
i
].
Red
<<
16
|
cm
->
Colors
[
i
].
Green
<<
8
|
cm
->
Colors
[
i
].
Blue
;
}
count
=
cm
->
ColorCount
;
}
else
{
colors
[
i
]
=
0xff000000
|
/* alpha */
cm
->
Colors
[
i
].
Red
<<
16
|
cm
->
Colors
[
i
].
Green
<<
8
|
cm
->
Colors
[
i
].
Blue
;
colors
[
0
]
=
0xff000000
;
colors
[
1
]
=
0xffffffff
;
for
(
i
=
2
;
i
<
256
;
i
++
)
colors
[
i
]
=
0xff000000
;
count
=
256
;
}
/* look for the transparent color extension */
...
...
@@ -1217,7 +1230,7 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet
}
}
return
IWICPalette_InitializeCustom
(
palette
,
colors
,
c
m
->
ColorC
ount
);
return
IWICPalette_InitializeCustom
(
palette
,
colors
,
count
);
}
static
HRESULT
WINAPI
GifDecoder_GetMetadataQueryReader
(
IWICBitmapDecoder
*
iface
,
...
...
dlls/windowscodecs/tests/gifformat.c
View file @
3738c6b0
...
...
@@ -284,7 +284,6 @@ static void test_local_gif_palette(void)
/* global palette */
hr
=
IWICBitmapDecoder_CopyPalette
(
decoder
,
palette
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
WINCODEC_ERR_FRAMEMISSING
),
"CopyPalette %#x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
...
...
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