mirror of
https://github.com/reactos/wine.git
synced 2025-02-04 02:56:31 +00:00
Fixed GetDIBits problems.
This commit is contained in:
parent
32b4325d6b
commit
dee464c4c6
File diff suppressed because it is too large
Load Diff
@ -224,12 +224,13 @@ typedef struct
|
||||
struct tagDC *dc;
|
||||
LPCVOID bits;
|
||||
XImage *image;
|
||||
PALETTEENTRY *palentry;
|
||||
int lines;
|
||||
DWORD infoWidth;
|
||||
WORD depth;
|
||||
WORD infoBpp;
|
||||
WORD compression;
|
||||
int *colorMap;
|
||||
RGBQUAD *colorMap;
|
||||
int nColorMap;
|
||||
Drawable drawable;
|
||||
GC gc;
|
||||
|
@ -535,7 +535,7 @@ INT WINAPI GetDIBits(
|
||||
if (bits && lines)
|
||||
{
|
||||
/* If the bitmap object already have a dib section that contains image data, get the bits from it*/
|
||||
if(bmp->dib->dsBm.bmBits && bmp->dib->dsBm.bmBitsPixel >= 16 && info->bmiHeader.biBitCount >= 16)
|
||||
if(bmp->dib && bmp->dib->dsBm.bmBitsPixel >= 15 && info->bmiHeader.biBitCount >= 15)
|
||||
{
|
||||
/*FIXME: Only RGB dibs supported for now */
|
||||
int srcwidth = bmp->dib->dsBm.bmWidth, srcwidthb = bmp->dib->dsBm.bmWidthBytes;
|
||||
@ -545,12 +545,13 @@ INT WINAPI GetDIBits(
|
||||
|
||||
if ((info->bmiHeader.biHeight < 0) ^ (bmp->dib->dsBmih.biHeight < 0))
|
||||
{
|
||||
dbits = bits + (dstwidthb * lines);
|
||||
dbits = bits + (dstwidthb * (lines-1));
|
||||
dstwidthb = -dstwidthb;
|
||||
}
|
||||
|
||||
switch( info->bmiHeader.biBitCount ) {
|
||||
|
||||
case 15:
|
||||
case 16: /* 16 bpp dstDIB */
|
||||
{
|
||||
LPWORD dstbits = (LPWORD)dbits;
|
||||
|
Loading…
x
Reference in New Issue
Block a user