(x_build_heuristic_mask): Filter palette info from color.
authorJason Rumney <jasonr@gnu.org>
Mon, 18 Nov 2002 21:32:55 +0000 (21:32 +0000)
committerJason Rumney <jasonr@gnu.org>
Mon, 18 Nov 2002 21:32:55 +0000 (21:32 +0000)
(XPutPixel): Swap blue and red.

src/w32fns.c

index ab2e523..f202eae 100644 (file)
@@ -10749,9 +10749,10 @@ static void XPutPixel (ximg, x, y, color)
     rowbytes += 4 - (rowbytes % 4);
 
   pixel = ximg->data + y * rowbytes + x * 3;
-  *pixel = GetRValue (color);
+  /* Windows bitmaps are in BGR order.  */
+  *pixel = GetBValue (color);
   *(pixel + 1) = GetGValue (color);
-  *(pixel + 2) = GetBValue (color);
+  *(pixel + 2) = GetRValue (color);
 }