Exif support (labeled experimental since 2003) is somewhat adequate for reading, but there's no clear way to change a value and then write it out. We currently support writing Exif as byte strings, with no way to make them apart from manually setting up nested TiffImagePlugin.ImageFileDirectory instances, then calling save into a file pointer.
Image.getexif() should exist, and return an Exif object.
- The Exif object should export a dictionary interface.
- The Exif object should have a
toBytes() method returning the correct bytes.
Exif.load(bytes).toBytes() should roundtrip.
- This should work:
exif = Exif()
exif['Orientation'] = 1
im.save('temp.jpg', exif=exif)
Exif support (labeled experimental since 2003) is somewhat adequate for reading, but there's no clear way to change a value and then write it out. We currently support writing Exif as byte strings, with no way to make them apart from manually setting up nested
TiffImagePlugin.ImageFileDirectoryinstances, then calling save into a file pointer.Image.getexif()should exist, and return an Exif object.toBytes()method returning the correct bytes.Exif.load(bytes).toBytes()should roundtrip.