From: Jason Rumney Date: Mon, 18 Nov 2002 21:32:55 +0000 (+0000) Subject: (x_build_heuristic_mask): Filter palette info from color. X-Git-Tag: ttn-vms-21-2-B4~12344 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=adda530bc8492f7207d2c6dd4fdd27d264910f0b;p=emacs.git (x_build_heuristic_mask): Filter palette info from color. (XPutPixel): Swap blue and red. --- diff --git a/src/w32fns.c b/src/w32fns.c index ab2e5237c61..f202eae18e8 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -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); }