Skip to content

Commit

Permalink
static
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 7, 2023
1 parent 801d5a1 commit 8599004
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
docker: [
alpine,
amazon-2-amd64,
amazon-2023-amd64,
arch,
centos-7-amd64,
centos-stream-8-amd64,
centos-stream-9-amd64,
debian-11-bullseye-amd64,
debian-12-bookworm-x86,
debian-12-bookworm-amd64,
]
Expand Down
6 changes: 5 additions & 1 deletion Tests/test_lib_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
def test_equal(mode):
num_img_bytes = len(Image.new(mode, (2, 2)).tobytes())
# alternatively, random.randbytes() in Python 3.9
data = secrets.token_bytes(num_img_bytes)
data = b"\xa4\xf6\x1a\xd4\xee\x15[EI\xf1\xfb^"#secrets.token_bytes(num_img_bytes)
print("input", data)
img_a = Image.frombytes(mode, (2, 2), data)
img_b = Image.frombytes(mode, (2, 2), data)
assert img_a.tobytes() == img_b.tobytes()
print("tobytes", img_a.tobytes(), img_b.tobytes())
assert img_a.im == img_b.im
if mode == "BGR;24":
assert False
1 change: 1 addition & 0 deletions src/_imaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -3797,6 +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 %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 8599004

Please sign in to comment.