diff --git a/src/PIL/AvifImagePlugin.py b/src/PIL/AvifImagePlugin.py index d9d2850037e..cbefb230396 100644 --- a/src/PIL/AvifImagePlugin.py +++ b/src/PIL/AvifImagePlugin.py @@ -177,7 +177,7 @@ def _save( else: exif_data = Image.Exif() exif_data.load(exif) - exif_orientation = exif_data.get(ExifTags.Base.Orientation, 0) + exif_orientation = exif_data.pop(ExifTags.Base.Orientation, 0) xmp = info.get("xmp", im.info.get("xmp") or im.info.get("XML:com.adobe.xmp"))