mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 13:14:27 +03:00
Handle tag_v2 in TiffImagePlugin
This commit is contained in:
parent
d0abab7997
commit
1217b13b9e
|
@ -611,10 +611,6 @@ def exif_transpose(image, *, in_place=False):
|
|||
exif = exif_image.getexif()
|
||||
if ExifTags.Base.Orientation in exif:
|
||||
del exif[ExifTags.Base.Orientation]
|
||||
if in_place and ExifTags.Base.Orientation in getattr(
|
||||
exif_image, "tag_v2", {}
|
||||
):
|
||||
del exif_image.tag_v2[ExifTags.Base.Orientation]
|
||||
if "exif" in exif_image.info:
|
||||
exif_image.info["exif"] = exif.tobytes()
|
||||
elif "Raw profile type exif" in exif_image.info:
|
||||
|
|
|
@ -1220,6 +1220,8 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
exif.get_ifd(key)
|
||||
|
||||
ImageOps.exif_transpose(self, in_place=True)
|
||||
if ExifTags.Base.Orientation in self.tag_v2:
|
||||
del self.tag_v2[ExifTags.Base.Orientation]
|
||||
|
||||
def _load_libtiff(self):
|
||||
"""Overload method triggered when we detect a compressed tiff
|
||||
|
|
Loading…
Reference in New Issue
Block a user