summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXImage.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXImage.c')
-rw-r--r--macosx/tkMacOSXImage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 5b58393..e3beb5c 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -646,8 +646,8 @@ CreateCGImageFromPixmap(
*----------------------------------------------------------------------
*/
struct pixel_fmt {int r; int g; int b; int a;};
-static struct pixel_fmt bgra = {2, 1, 0, 3};
-static struct pixel_fmt argb = {1, 2, 3, 0};
+static struct pixel_fmt rgba = {0, 1, 2, 3};
+static struct pixel_fmt argb = {3, 0, 1, 2};
XImage *
XGetImage(
@@ -702,10 +702,10 @@ XGetImage(
/*
* When Apple extracts a bitmap from an NSView, it may be in either
- * BGRA or ARGB format. For an XImage we need RGBA.
+ * RGBA or ARGB format. For an XImage we need RGBA.
*/
- struct pixel_fmt pixel = bitmap_fmt == 0 ? bgra : argb;
+ struct pixel_fmt pixel = bitmap_fmt == 0 ? rgba : argb;
for (row = 0, n = 0; row < height; row++, n += bytes_per_row) {
for (m = n; m < n + 4*width; m += 4) {