gdi32: Pass the correct depth to PutImage for SetBitmapBits on a DIB.
This commit is contained in:
parent
f85a28faf6
commit
70d8341a67
|
@ -481,7 +481,7 @@ LONG WINAPI SetBitmapBits(
|
|||
/* query the color info */
|
||||
info->bmiHeader.biSize = sizeof(info->bmiHeader);
|
||||
info->bmiHeader.biPlanes = 1;
|
||||
info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel;
|
||||
info->bmiHeader.biBitCount = bmp->dib ? bmp->dib->dsBmih.biBitCount : bmp->bitmap.bmBitsPixel;
|
||||
info->bmiHeader.biCompression = BI_RGB;
|
||||
info->bmiHeader.biXPelsPerMeter = 0;
|
||||
info->bmiHeader.biYPelsPerMeter = 0;
|
||||
|
@ -494,8 +494,6 @@ LONG WINAPI SetBitmapBits(
|
|||
|
||||
if (!err || err == ERROR_BAD_FORMAT)
|
||||
{
|
||||
info->bmiHeader.biPlanes = 1;
|
||||
info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel;
|
||||
info->bmiHeader.biWidth = bmp->bitmap.bmWidth;
|
||||
info->bmiHeader.biHeight = -dst.height;
|
||||
info->bmiHeader.biSizeImage = dst.height * dst_stride;
|
||||
|
|
Loading…
Reference in New Issue