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
7e2be17d
Commit
7e2be17d
authored
Dec 13, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: Added support for doing GetBitmapBits on a DIB section.
Simply copy the DIB bits in that case.
parent
6b1e75d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
bitmap.c
dlls/gdi/bitmap.c
+24
-0
No files found.
dlls/gdi/bitmap.c
View file @
7e2be17d
...
...
@@ -307,6 +307,30 @@ LONG WINAPI GetBitmapBits(
if
(
!
bmp
)
return
0
;
if
(
bmp
->
dib
)
/* simply copy the bits from the DIB */
{
DIBSECTION
*
dib
=
bmp
->
dib
;
const
char
*
src
=
dib
->
dsBm
.
bmBits
;
DWORD
max
=
dib
->
dsBm
.
bmWidthBytes
*
dib
->
dsBm
.
bmHeight
;
if
(
count
>
max
)
count
=
max
;
ret
=
count
;
if
(
!
bits
)
goto
done
;
if
(
bmp
->
dib
->
dsBmih
.
biHeight
>=
0
)
/* not top-down, need to flip contents vertically */
{
src
+=
dib
->
dsBm
.
bmWidthBytes
*
dib
->
dsBm
.
bmHeight
;
while
(
count
>
0
)
{
src
-=
dib
->
dsBm
.
bmWidthBytes
;
memcpy
(
bits
,
src
,
min
(
count
,
dib
->
dsBm
.
bmWidthBytes
)
);
bits
=
(
char
*
)
bits
+
dib
->
dsBm
.
bmWidthBytes
;
count
-=
dib
->
dsBm
.
bmWidthBytes
;
}
}
else
memcpy
(
bits
,
src
,
count
);
goto
done
;
}
/* If the bits vector is null, the function should return the read size */
if
(
bits
==
NULL
)
{
...
...
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