diff --git a/src/_imaging.c b/src/_imaging.c index 2a73a06338d..96c781abdc6 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -3767,9 +3767,9 @@ _compare_pixels( // These modes have three channels in four bytes, // so we have to ignore the last byte. #ifdef WORDS_BIGENDIAN - mask = 0xffffff00; + mask = 0xffff0000; #else - mask = 0x00ffffff; + mask = 0x0000ffff; #endif } else if (!strcmp(mode, "LA") || !strcmp(mode, "La") || !strcmp(mode, "PA")) { // These modes have two channels in four bytes,