For a 15/16 bpp dib we send RGB triples to the printer so the size

multiplier is 3 not 2.
This commit is contained in:
Huw Davies 2004-11-30 21:02:46 +00:00 committed by Alexandre Julliard
parent ca371a48b2
commit 5763977496

View file

@ -58,7 +58,7 @@ static BOOL get_bitmap_info( const void *ptr, LONG *width, LONG *height, WORD *b
{
case sizeof(BITMAPCOREHEADER):
{
const BITMAPCOREHEADER *core = (BITMAPCOREHEADER *)header;
const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)header;
*width = core->bcWidth;
*height = core->bcHeight;
*bpp = core->bcBitCount;
@ -320,7 +320,7 @@ INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst, INT widthDs
src_ptr = bits;
src_ptr += (ySrc * widthbytes);
bitmap_size = heightSrc * widthSrc * 2;
bitmap_size = heightSrc * widthSrc * 3;
dst_ptr = bitmap = HeapAlloc(GetProcessHeap(), 0, bitmap_size);
for(line = 0; line < heightSrc; line++, src_ptr += widthbytes) {