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
fddf5ce1
Commit
fddf5ce1
authored
Mar 30, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Mar 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Select the dibsection into a dc before calling GetDIBColorTable.
parent
96db7b27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
dib.c
objects/dib.c
+16
-4
No files found.
objects/dib.c
View file @
fddf5ce1
...
...
@@ -415,12 +415,19 @@ INT WINAPI GetDIBits(
DC
*
dc
;
BITMAPOBJ
*
bmp
;
int
i
;
HDC
memdc
;
if
(
!
info
)
return
0
;
if
(
!
(
dc
=
DC_GetDCUpdate
(
hdc
)))
return
0
;
memdc
=
CreateCompatibleDC
(
hdc
);
if
(
!
(
dc
=
DC_GetDCUpdate
(
hdc
)))
{
DeleteDC
(
memdc
);
return
0
;
}
if
(
!
(
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hbitmap
,
BITMAP_MAGIC
)))
{
GDI_ReleaseObj
(
hdc
);
DeleteDC
(
memdc
);
return
0
;
}
...
...
@@ -433,8 +440,12 @@ INT WINAPI GetDIBits(
/* If the bitmap object already has a dib section at the
same color depth then get the color map from it */
if
(
bmp
->
dib
&&
bmp
->
dib
->
dsBm
.
bmBitsPixel
==
info
->
bmiHeader
.
biBitCount
)
{
if
(
coloruse
==
DIB_RGB_COLORS
)
GetDIBColorTable
(
hdc
,
0
,
1
<<
info
->
bmiHeader
.
biBitCount
,
info
->
bmiColors
);
if
(
coloruse
==
DIB_RGB_COLORS
)
{
HBITMAP
oldbm
;
oldbm
=
SelectObject
(
memdc
,
hbitmap
);
GetDIBColorTable
(
memdc
,
0
,
1
<<
info
->
bmiHeader
.
biBitCount
,
info
->
bmiColors
);
SelectObject
(
memdc
,
oldbm
);
}
else
{
WORD
*
index
=
(
WORD
*
)
info
->
bmiColors
;
int
i
;
...
...
@@ -450,6 +461,7 @@ INT WINAPI GetDIBits(
if
(
!
(
palette
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
dc
->
hPalette
,
PALETTE_MAGIC
)))
{
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hbitmap
);
DeleteDC
(
memdc
);
return
0
;
}
palEntry
=
palette
->
logpalette
.
palPalEntry
;
...
...
@@ -742,7 +754,7 @@ INT WINAPI GetDIBits(
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hbitmap
);
DeleteDC
(
memdc
);
return
lines
;
}
...
...
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