gdi32: Flip the bitmap in StretchBlt before the StretchDIBits call (eterbug #664)
authorIlya Shpigor <shpigor@etersoft.ru>
Thu, 25 Feb 2010 09:35:39 +0000 (12:35 +0300)
committerIlya Shpigor <shpigor@etersoft.ru>
Thu, 25 Feb 2010 13:03:16 +0000 (16:03 +0300)
dlls/gdi32/bitblt.c
dlls/gdi32/bitmap.c

index 879b38d5b367dcf7200beec32c228d59928bb2b3..d68a1b3be9b3556f1ffded4ba7c9619db12aee7b 100644 (file)
@@ -194,7 +194,7 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
  
         info_hdr.biSize = sizeof(info_hdr);
         info_hdr.biWidth = bm.bmWidth;
-        info_hdr.biHeight = bm.bmHeight;
+        info_hdr.biHeight = -bm.bmHeight;
         info_hdr.biPlanes = 1;
         info_hdr.biBitCount = 32;
         info_hdr.biCompression = BI_RGB;
index 05cbe86a55ea3f9df833c2eb103ed496d121b125..6a5b8f800af170488faa22556ad19f2d06bbf1a6 100644 (file)
@@ -483,7 +483,7 @@ LONG WINAPI SetBitmapBits(
         if (count > max) count = max;
         ret = count;
 
-        if (bmp->dib->dsBmih.biHeight < 0)  /* top-down, need to flip contents vertically */
+        if (bmp->dib->dsBmih.biHeight >= 0)  /* not top-down, need to flip contents vertically */
         {
             dest += dib->dsBm.bmWidthBytes * dib->dsBm.bmHeight;
             while (count > 0)