Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
d78e2e5e
Commit
d78e2e5e
authored
25 years ago
by
Jim Aston
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Handle 24 bit DIBs <-> 24 bit deep/24 bits per pixel XImages.
parent
457df920
No related branches found
Branches containing commit
Tags
wine-990131
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
graphics/x11drv/dib.c
+32
-0
32 additions, 0 deletions
graphics/x11drv/dib.c
with
32 additions
and
0 deletions
graphics/x11drv/dib.c
+
32
−
0
View file @
d78e2e5e
...
...
@@ -1697,6 +1697,22 @@ static void X11DRV_DIB_SetImageBits_24( int lines, const BYTE *srcbits,
switch
(
bmpImage
->
depth
)
{
case
24
:
{
if
(
bmpImage
->
bits_per_pixel
==
24
)
{
int
tocopy
=
linebytes
;
BYTE
*
dstpixel
;
BYTE
*
ptr
=
srcbits
+
left
*
3
;
if
(
tocopy
<
0
)
tocopy
=
-
tocopy
;
dstpixel
=
bmpImage
->
data
+
lines
*
tocopy
+
left
*
3
;
for
(
h
=
lines
;
h
--
;
)
{
dstpixel
-=
tocopy
;
memcpy
(
dstpixel
,
ptr
,
tocopy
);
ptr
+=
linebytes
;
}
break
;
}
}
case
32
:
{
if
(
bmpImage
->
blue_mask
==
0xff
&&
bmpImage
->
red_mask
==
0xff0000
)
/* packed BGR to unpacked BGR */
...
...
@@ -1915,6 +1931,22 @@ static void X11DRV_DIB_GetImageBits_24( int lines, BYTE *dstbits,
switch
(
bmpImage
->
depth
)
{
case
24
:
{
if
(
bmpImage
->
bits_per_pixel
==
24
)
{
int
tocopy
=
linebytes
;
BYTE
*
srcpixel
;
BYTE
*
ptr
=
(
LPBYTE
)
dstbits
;
if
(
tocopy
<
0
)
tocopy
=
-
tocopy
;
srcpixel
=
bmpImage
->
data
+
lines
*
tocopy
;
for
(
h
=
lines
;
h
--
;
)
{
srcpixel
-=
tocopy
;
memcpy
(
ptr
,
srcpixel
,
tocopy
);
ptr
=
(
LPBYTE
)(
dstbits
+=
linebytes
);
}
break
;
}
}
case
32
:
{
DWORD
*
srcpixel
,
buf
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment