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
426b0236
Commit
426b0236
authored
May 10, 2004
by
Maxime Bellengé
Committed by
Alexandre Julliard
May 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly create the byte array of gif images to match what
CreateDIBitmap expects.
parent
c77788b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
olepicture.c
dlls/oleaut32/olepicture.c
+11
-8
No files found.
dlls/oleaut32/olepicture.c
View file @
426b0236
...
...
@@ -942,7 +942,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
ColorMapObject
*
cm
;
int
transparent
=
-
1
;
ExtensionBlock
*
eb
;
int
padding
;
gd
.
data
=
xbuf
;
gd
.
curoff
=
0
;
gd
.
len
=
xread
;
...
...
@@ -965,8 +966,9 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
gif
->
Image
.
Interlace
);
/* */
padding
=
(
gif
->
SWidth
+
3
)
&
~
3
;
bmi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BITMAPINFOHEADER
)
+
(
1
<<
gif
->
SColorResolution
)
*
sizeof
(
RGBQUAD
));
bytes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
gif
->
SWidth
*
gif
->
SHeight
);
bytes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
padding
*
gif
->
SHeight
);
si
=
gif
->
SavedImages
+
0
;
gid
=
&
(
si
->
ImageDesc
);
cm
=
gid
->
ColorMap
;
...
...
@@ -993,17 +995,18 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
}
}
/* Map to in picture coordinates */
for
(
i
=
0
;
i
<
gid
->
Height
;
i
++
)
for
(
j
=
0
;
j
<
gid
->
Width
;
j
++
)
bytes
[(
gid
->
Top
+
(
gif
->
SHeight
-
i
-
1
))
*
gif
->
SWidth
+
gid
->
Left
+
j
]
=
si
->
RasterBits
[
i
*
gid
->
Width
+
j
];
/* Map to in picture coordinates */
for
(
i
=
0
;
i
<
gid
->
Height
;
i
++
)
for
(
j
=
0
;
j
<
gid
->
Width
;
j
++
)
bytes
[(
gid
->
Top
+
i
)
*
(
padding
)
+
gid
->
Left
+
j
]
=
si
->
RasterBits
[
i
*
gid
->
Width
+
j
];
bmi
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
bmi
->
bmiHeader
.
biWidth
=
gif
->
SWidth
;
bmi
->
bmiHeader
.
biHeight
=
gif
->
SHeight
;
bmi
->
bmiHeader
.
biHeight
=
-
gif
->
SHeight
;
bmi
->
bmiHeader
.
biPlanes
=
1
;
bmi
->
bmiHeader
.
biBitCount
=
8
;
bmi
->
bmiHeader
.
biCompression
=
BI_RGB
;
bmi
->
bmiHeader
.
biSizeImage
=
gif
->
SWidth
*
gif
->
SHeight
;
bmi
->
bmiHeader
.
biSizeImage
=
padding
*
gif
->
SHeight
;
bmi
->
bmiHeader
.
biXPelsPerMeter
=
0
;
bmi
->
bmiHeader
.
biYPelsPerMeter
=
0
;
bmi
->
bmiHeader
.
biClrUsed
=
1
<<
gif
->
SColorResolution
;
...
...
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