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
c5384f14
Commit
c5384f14
authored
May 24, 2000
by
Rob Farnum
Committed by
Alexandre Julliard
May 24, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate out the 32bit case from the 24bit case, and copy 3bytes of
source for every 4bytes of input, into the destination for the 24bit case.
parent
53532248
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
2 deletions
+49
-2
dib.c
graphics/x11drv/dib.c
+49
-2
No files found.
graphics/x11drv/dib.c
View file @
c5384f14
...
...
@@ -2221,7 +2221,6 @@ static void X11DRV_DIB_SetImageBits_32( int lines, const BYTE *srcbits,
switch
(
bmpImage
->
depth
)
{
case
24
:
case
32
:
/* ==== 32 BGR dib to 24/32 BGR bitmap ==== */
if
(
bmpImage
->
red_mask
==
0xff0000
&&
bmpImage
->
blue_mask
==
0xff
)
{
...
...
@@ -2247,6 +2246,29 @@ static void X11DRV_DIB_SetImageBits_32( int lines, const BYTE *srcbits,
break
;
case
24
:
/* ==== 32 BGR dib to 24 (888) BGR bitmap ==== */
/* we need to check that source mask matches destination */
{
DWORD
*
srcpixel
;
BYTE
*
bptr
;
srcpixel
=
(
DWORD
*
)
srcbits
+
left
;
bptr
=
bmpImage
->
data
;
for
(
h
=
lines
-
1
;
h
>=
0
;
h
--
)
{
for
(
x
=
0
;
x
<
dstwidth
;
x
++
)
{
/* *srcpixel is a 32bit value */
/* bptr points to first of 3 bytes */
*
bptr
++
=
(
*
srcpixel
>>
16
)
&
0xff
;
*
bptr
++
=
(
*
srcpixel
>>
8
)
&
0xff
;
*
bptr
++
=
(
*
srcpixel
)
&
0xff
;
srcpixel
++
;
}
}
}
break
;
case
15
:
/* ==== 32 BGR dib to 555 BGR bitmap ==== */
if
(
bmpImage
->
red_mask
==
0x7c00
&&
bmpImage
->
blue_mask
==
0x001f
)
...
...
@@ -2360,7 +2382,6 @@ static void X11DRV_DIB_GetImageBits_32( int lines, BYTE *dstbits,
switch
(
bmpImage
->
depth
)
{
case
24
:
case
32
:
/* ==== 24/32 BGR bitmap to 32 BGR dib ==== */
if
(
bmpImage
->
red_mask
==
0xff0000
&&
bmpImage
->
blue_mask
==
0xff
)
...
...
@@ -2385,6 +2406,32 @@ static void X11DRV_DIB_GetImageBits_32( int lines, BYTE *dstbits,
else
goto
notsupported
;
break
;
case
24
:
/* ==== 24 BGR bitmap to 32 (0888) BGR dib ==== */
/* we need to check that source mask matches destination */
{
DWORD
*
srcpixel
;
BYTE
*
bptr
;
DWORD
srcdata
;
srcpixel
=
(
DWORD
*
)
dstbits
;
bptr
=
bmpImage
->
data
;
for
(
h
=
lines
-
1
;
h
>=
0
;
h
--
)
{
for
(
x
=
0
;
x
<
dstwidth
;
x
++
)
{
/* *srcpixel is a 32bit value */
/* bptr points to first of 3 bytes */
srcdata
=
0
;
srcdata
=
srcdata
<<
8
|
*
bptr
++
;
srcdata
=
srcdata
<<
8
|
*
bptr
++
;
srcdata
=
srcdata
<<
8
|
*
bptr
++
;
*
srcpixel
++
=
srcdata
;
}
}
}
break
;
case
15
:
{
LPWORD
srcpixel
;
...
...
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