Leave bitwise and operations unchanged

This commit is contained in:
Andrew Murray 2024-03-09 15:54:55 +11:00 committed by GitHub
parent 42620f1c19
commit 6432ec4bbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -507,10 +507,10 @@ rgba2rgb_(UINT8 *out, const UINT8 *in, int xsize) {
static void static void
rgbT2rgba(UINT8 *out, int xsize, int r, int g, int b) { rgbT2rgba(UINT8 *out, int xsize, int r, int g, int b) {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
UINT32 trns = ((r & 0xffU) << 24) | ((g & 0xffU) << 16) | ((b & 0xffU) << 8) | 0xff; UINT32 trns = ((r & 0xff) << 24) | ((g & 0xff) << 16) | ((b & 0xff) << 8) | 0xff;
UINT32 repl = trns & 0xffffff00; UINT32 repl = trns & 0xffffff00;
#else #else
UINT32 trns = (0xffU << 24) | ((b & 0xffU) << 16) | ((g & 0xffU) << 8) | (r & 0xff); UINT32 trns = (0xffU << 24) | ((b & 0xff) << 16) | ((g & 0xff) << 8) | (r & 0xff);
UINT32 repl = trns & 0x00ffffff; UINT32 repl = trns & 0x00ffffff;
#endif #endif