From ce940eee0ff94403e2093dcce3866a764c6a75e7 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 5 Jul 2003 17:01:30 +0000 Subject: [PATCH] try some better default offsets for big endian machines. print what the conversion is so i can see what it should be if im wrong though --- render/color.c | 4 ++++ render/render.h | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/render/color.c b/render/color.c index 3e846d08..46f81161 100644 --- a/render/color.c +++ b/render/color.c @@ -75,6 +75,10 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) if ((RrRedOffset(inst) != RrDefaultRedOffset) || (RrBlueOffset(inst) != RrDefaultBlueOffset) || (RrGreenOffset(inst) != RrDefaultGreenOffset)) { + g_message("CONVERSION %d->%d %d->%d %d->%d", + RrDefaultRedOffset, RrRedOffset(inst), + RrDefaultBlueOffset, RrGreenOffset(inst), + RrDefaultGreenOffset, RrBlueOffset(inst)); for (y = 0; y < im->height; y++) { for (x = 0; x < im->width; x++) { r = (data[x] >> RrDefaultRedOffset) & 0xFF; diff --git a/render/render.h b/render/render.h index 4fe7db1a..56ec29f1 100644 --- a/render/render.h +++ b/render/render.h @@ -128,10 +128,10 @@ struct _RrAppearance { }; #if (G_BYTE_ORDER == G_BIG_ENDIAN) -#define RrDefaultRedOffset 0 -#define RrDefaultGreenOffset 8 -#define RrDefaultBlueOffset 16 -#define RrDefaultAlphaOffset 24 +#define RrDefaultAlphaOffset 0 +#define RrDefaultRedOffset 8 +#define RrDefaultGreenOffset 16 +#define RrDefaultBlueOffset 24 #define RrEndian MSBFirst #else #define RrDefaultAlphaOffset 24 -- 2.45.2