Commit 57639774 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

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

multiplier is 3 not 2.
parent ca371a48
...@@ -58,7 +58,7 @@ static BOOL get_bitmap_info( const void *ptr, LONG *width, LONG *height, WORD *b ...@@ -58,7 +58,7 @@ static BOOL get_bitmap_info( const void *ptr, LONG *width, LONG *height, WORD *b
{ {
case sizeof(BITMAPCOREHEADER): case sizeof(BITMAPCOREHEADER):
{ {
const BITMAPCOREHEADER *core = (BITMAPCOREHEADER *)header; const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)header;
*width = core->bcWidth; *width = core->bcWidth;
*height = core->bcHeight; *height = core->bcHeight;
*bpp = core->bcBitCount; *bpp = core->bcBitCount;
...@@ -320,7 +320,7 @@ INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst, INT widthDs ...@@ -320,7 +320,7 @@ INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst, INT widthDs
src_ptr = bits; src_ptr = bits;
src_ptr += (ySrc * widthbytes); src_ptr += (ySrc * widthbytes);
bitmap_size = heightSrc * widthSrc * 2; bitmap_size = heightSrc * widthSrc * 3;
dst_ptr = bitmap = HeapAlloc(GetProcessHeap(), 0, bitmap_size); dst_ptr = bitmap = HeapAlloc(GetProcessHeap(), 0, bitmap_size);
for(line = 0; line < heightSrc; line++, src_ptr += widthbytes) { for(line = 0; line < heightSrc; line++, src_ptr += widthbytes) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment