Skip to content

Save multiple images in a tiff file #3636

@romain7594

Description

@romain7594

What did you do?

I open a tiff file, I add tags to some of the images in it, then save

What did you expect to happen?

Save modifications

What actually happened?

The added tag isn't saved

What are your OS, Python and Pillow versions?

  • OS: windows 7
  • Python: 3.6
  • Pillow: 5.1.0
from PIL import Image, TiffImagePlugin

im = Image.open("test.tiff")
im.seek(6)
info = TiffImagePlugin.ImageFileDirectory()
info[56] = 54
info.tagtype[56] = 3
im.save("test_out.tiff", save_all=True, tiffinfo = info)

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