mirror of
https://github.com/reactos/wine.git
synced 2025-02-09 13:43:16 +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;
|
struct tagDC *dc;
|
||||||
LPCVOID bits;
|
LPCVOID bits;
|
||||||
XImage *image;
|
XImage *image;
|
||||||
|
PALETTEENTRY *palentry;
|
||||||
int lines;
|
int lines;
|
||||||
DWORD infoWidth;
|
DWORD infoWidth;
|
||||||
WORD depth;
|
WORD depth;
|
||||||
WORD infoBpp;
|
WORD infoBpp;
|
||||||
WORD compression;
|
WORD compression;
|
||||||
int *colorMap;
|
RGBQUAD *colorMap;
|
||||||
int nColorMap;
|
int nColorMap;
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
GC gc;
|
GC gc;
|
||||||
|
@ -535,7 +535,7 @@ INT WINAPI GetDIBits(
|
|||||||
if (bits && lines)
|
if (bits && lines)
|
||||||
{
|
{
|
||||||
/* If the bitmap object already have a dib section that contains image data, get the bits from it*/
|
/* 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 */
|
/*FIXME: Only RGB dibs supported for now */
|
||||||
int srcwidth = bmp->dib->dsBm.bmWidth, srcwidthb = bmp->dib->dsBm.bmWidthBytes;
|
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))
|
if ((info->bmiHeader.biHeight < 0) ^ (bmp->dib->dsBmih.biHeight < 0))
|
||||||
{
|
{
|
||||||
dbits = bits + (dstwidthb * lines);
|
dbits = bits + (dstwidthb * (lines-1));
|
||||||
dstwidthb = -dstwidthb;
|
dstwidthb = -dstwidthb;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( info->bmiHeader.biBitCount ) {
|
switch( info->bmiHeader.biBitCount ) {
|
||||||
|
|
||||||
|
case 15:
|
||||||
case 16: /* 16 bpp dstDIB */
|
case 16: /* 16 bpp dstDIB */
|
||||||
{
|
{
|
||||||
LPWORD dstbits = (LPWORD)dbits;
|
LPWORD dstbits = (LPWORD)dbits;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user