summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2021-05-01 23:07:53 (GMT)
committerculler <culler>2021-05-01 23:07:53 (GMT)
commit24440a788ccdd3c10a818c051112ce007e2d1be4 (patch)
tree1fff3faa4d123d3bb3b98bb763299a675258a7d7 /macosx
parentc4993a786fb60d2834b1297326374355d7a5ea48 (diff)
downloadtk-24440a788ccdd3c10a818c051112ce007e2d1be4.zip
tk-24440a788ccdd3c10a818c051112ce007e2d1be4.tar.gz
tk-24440a788ccdd3c10a818c051112ce007e2d1be4.tar.bz2
ABGR -> ARGB as observed by Christopher Chavez.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXImage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 410e38e..5b58393 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -647,7 +647,7 @@ 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 abgr = {3, 2, 1, 0};
+static struct pixel_fmt argb = {1, 2, 3, 0};
XImage *
XGetImage(
@@ -702,10 +702,10 @@ XGetImage(
/*
* When Apple extracts a bitmap from an NSView, it may be in either
- * BGRA or ABGR format. For an XImage we need RGBA.
+ * BGRA or ARGB format. For an XImage we need RGBA.
*/
- struct pixel_fmt pixel = bitmap_fmt == 0 ? bgra : abgr;
+ struct pixel_fmt pixel = bitmap_fmt == 0 ? bgra : argb;
for (row = 0, n = 0; row < height; row++, n += bytes_per_row) {
for (m = n; m < n + 4*width; m += 4) {