Skip to content

Pillow 11.1.0 PNG file differences in Linux and MacOS #8796

@henu

Description

@henu

We noticed with my coworker that newest Pillow version produces different PNG files when ran on MacOS, and this is currently breaking our tests.

We made this example to demonstrate the problem:

import PIL
from PIL import Image
ver = PIL.__version__
with open(f"/tmp/pillow_{ver}.png", "wb") as f:
    image = Image.new("RGBA", size=(10, 10), color=(256, 0, 0))
    image.save(f, format="png")

When ran on my Linux machine:

(venv) henu@nugetti:/tmp$ shasum /tmp/pillow_*.png
72f475411f224c867838cc01c1abef1508f647f4  /tmp/pillow_11.0.0.png
72f475411f224c867838cc01c1abef1508f647f4  /tmp/pillow_11.1.0.png

When ran on my coworker's MacOS machine:

$  shasum /tmp/pillow_11.*png
72f475411f224c867838cc01c1abef1508f647f4  /tmp/pillow_11.0.0.png
504925807f3cdd56c0f5ab49978257678da42f0a  /tmp/pillow_11.1.0.png

He also provided this extra info, in case it helps:

$  cmp -b /tmp/pillow_11.*png
/tmp/pillow_11.0.0.png /tmp/pillow_11.1.0.png differ: char 37, line 5 is  30   33

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions