Commit 70d8341a authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Pass the correct depth to PutImage for SetBitmapBits on a DIB.

parent f85a28fa
......@@ -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;
......
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