mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-22 05:53:22 +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()
|
exif = exif_image.getexif()
|
||||||
if ExifTags.Base.Orientation in exif:
|
if ExifTags.Base.Orientation in exif:
|
||||||
del exif[ExifTags.Base.Orientation]
|
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:
|
if "exif" in exif_image.info:
|
||||||
exif_image.info["exif"] = exif.tobytes()
|
exif_image.info["exif"] = exif.tobytes()
|
||||||
elif "Raw profile type exif" in exif_image.info:
|
elif "Raw profile type exif" in exif_image.info:
|
||||||
|
|
|
@ -1220,6 +1220,8 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
exif.get_ifd(key)
|
exif.get_ifd(key)
|
||||||
|
|
||||||
ImageOps.exif_transpose(self, in_place=True)
|
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):
|
def _load_libtiff(self):
|
||||||
"""Overload method triggered when we detect a compressed tiff
|
"""Overload method triggered when we detect a compressed tiff
|
||||||
|
|
Loading…
Reference in New Issue
Block a user