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
43076139
Commit
43076139
authored
Jul 19, 2005
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Jul 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GIF palette allocation, by relying on ColorCount instead of
SColorResolution.
parent
3153aa91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
olepicture.c
dlls/oleaut32/olepicture.c
+4
-4
No files found.
dlls/oleaut32/olepicture.c
View file @
43076139
...
...
@@ -1117,12 +1117,12 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
);
/* */
padding
=
(
gif
->
SWidth
+
3
)
&
~
3
;
bmi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BITMAPINFOHEADER
)
+
(
1
<<
gif
->
SColorResolution
)
*
sizeof
(
RGBQUAD
));
bytes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
padding
*
gif
->
SHeight
);
si
=
gif
->
SavedImages
+
0
;
gid
=
&
(
si
->
ImageDesc
);
cm
=
gid
->
ColorMap
;
if
(
!
cm
)
cm
=
gif
->
SColorMap
;
bmi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BITMAPINFOHEADER
)
+
(
cm
->
ColorCount
)
*
sizeof
(
RGBQUAD
));
bytes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
padding
*
gif
->
SHeight
);
/* look for the transparent color extension */
for
(
i
=
0
;
i
<
si
->
ExtensionBlockCount
;
++
i
)
{
...
...
@@ -1134,7 +1134,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
}
}
for
(
i
=
0
;
i
<
(
1
<<
gif
->
SColorResolution
);
i
++
)
{
for
(
i
=
0
;
i
<
cm
->
ColorCount
;
i
++
)
{
bmi
->
bmiColors
[
i
].
rgbRed
=
cm
->
Colors
[
i
].
Red
;
bmi
->
bmiColors
[
i
].
rgbGreen
=
cm
->
Colors
[
i
].
Green
;
bmi
->
bmiColors
[
i
].
rgbBlue
=
cm
->
Colors
[
i
].
Blue
;
...
...
@@ -1181,7 +1181,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
bmi
->
bmiHeader
.
biSizeImage
=
padding
*
gif
->
SHeight
;
bmi
->
bmiHeader
.
biXPelsPerMeter
=
0
;
bmi
->
bmiHeader
.
biYPelsPerMeter
=
0
;
bmi
->
bmiHeader
.
biClrUsed
=
1
<<
gif
->
SColorResolution
;
bmi
->
bmiHeader
.
biClrUsed
=
cm
->
ColorCount
;
bmi
->
bmiHeader
.
biClrImportant
=
0
;
hdcref
=
GetDC
(
0
);
...
...
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