Skip to content

Saving TIFF with compression throws Segmentation Fault 11 in 5.4.1, but not 5.3.0 #3677

@jeremydmoore

Description

@jeremydmoore

What did you do?

Opened a bitonal TIFF created with Adobe Photoshop CC (version 20.0.2) then saved it with Group4 compression using Pillow.

TIFF Image should be downloadable from Github repository here: https://github.com/photosbyjeremy/images/blob/master/test_bitonal_text.tif.zip

What did you expect to happen?

I expected the image to save with compression.

What actually happened?

In Pillow 5.4.1 there was a Segmentation Fault 11, but in Pillow 5.3.0 it works just fine.

screen shot 2019-02-25 at 2 09 47 pm

screen shot 2019-02-25 at 2 09 50 pm

What are your OS, Python and Pillow versions?

  • OS: macOS 10.14.3
  • Python: 3.6.8 (and I actually tried 3.7.1 first, but didn't screenshot those attempts)
  • Pillow: 5.4.1 and 5.3.0

Please include code that reproduces the issue and whenever possible, an image that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.

The best reproductions are self-contained scripts with minimal dependencies. If you are using a framework such as plone, Django, or buildout, try to replicate the issue just using Pillow.

from PIL import Image
image = Image.open('test_bitonal_text.tif')
image.save('test_pillow_save.tif', compression='group4')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions