Skip to content

Commit

Permalink
back
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 7, 2023
1 parent 035bcb2 commit 3cd2d5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Tests/test_lib_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ def test_equal(mode):
img_a = Image.frombytes(mode, (2, 2), data)
img_b = Image.frombytes(mode, (2, 2), data)
assert img_a.tobytes() == img_b.tobytes()
print([img_a.tobytes(), img_b.tobytes()])
assert img_a.im == img_b.im
6 changes: 3 additions & 3 deletions src/_imaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 0xffff0000;
mask = 0xffffff00;
#else
mask = 0x0000ffff;
mask = 0x00ffffff;
#endif
} else if (!strcmp(mode, "LA") || !strcmp(mode, "La") || !strcmp(mode, "PA")) {
// These modes have two channels in four bytes,
Expand Down Expand Up @@ -3797,7 +3797,7 @@ _compare_pixels(
UINT32 *line_b = (UINT32*)pixels_b[y];
for (x = 0; x < xsize; x++, line_a++, line_b++) {
if ((*line_a & mask) != (*line_b & mask)) {
printf("mask fail linea %lu lineb %lu mask %lu lineamask %lu linebmask %lu\n", *line_a, *line_b, mask, *line_a & mask, *line_b & mask);
printf("mask fail linea %u lineb %u mask %u lineamask %u linebmask %u\n", *line_a, *line_b, mask, *line_a & mask, *line_b & mask);
return 1;
}
}
Expand Down

0 comments on commit 3cd2d5e

Please sign in to comment.