Skip to content

Tag 262 (PhotometricInterpretation) is changed when saving as a TIFF #4804

@eliu-alltrust

Description

@eliu-alltrust

What did you do?

save an uncompressed tiff file to group 4 compressed tiff file

What did you expect to happen?

I expected to get a group 4 compressed tiff file and kept all other tags the same as original file

What actually happened?

I got a group 4 compressed tiff file, but Tag 262 (PhotometricInterpretation) was changed from 0 to 1

What are your OS, Python and Pillow versions?

  • OS: Window 10
  • Python: Python 3.6.8
  • Pillow: 7.2.0
from PIL import Image img = Image.open('uncompressed.tiff') print(img.tag) img.save('group4.tiff', compression="group4", tiffinfo=img.tag) img = Image.open('group4.tiff') print(img.tag)

pillowIssue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions