summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2021-05-02 13:06:20 (GMT)
committerculler <culler>2021-05-02 13:06:20 (GMT)
commit9809b3ea2b968f89c8521058921e53d57be13ec0 (patch)
treec2203075321016053c9522cf19f7f7ccefa89e09 /macosx
parent24440a788ccdd3c10a818c051112ce007e2d1be4 (diff)
downloadtk-9809b3ea2b968f89c8521058921e53d57be13ec0.zip
tk-9809b3ea2b968f89c8521058921e53d57be13ec0.tar.gz
tk-9809b3ea2b968f89c8521058921e53d57be13ec0.tar.bz2
Oops. Cosmetic change meant to reduce confusion actually increased it. Try again.
Diffstat (limited to 'macosx')
-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) {