diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index 003d292beab..a55890434bf 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -329,15 +329,6 @@ def test_exif(self) -> None: exif = im.getexif() assert exif[274] == 3 - def test_exif_save_default(self, tmp_path: Path) -> None: - with Image.open("Tests/images/avif/exif.avif") as im: - test_file = str(tmp_path / "temp.avif") - im.save(test_file) - - with Image.open(test_file) as reloaded: - exif = reloaded.getexif() - assert exif[274] == 1 - @pytest.mark.parametrize("bytes", [True, False]) def test_exif_save_argument(self, tmp_path: Path, bytes: bool) -> None: exif = Image.Exif() diff --git a/src/PIL/AvifImagePlugin.py b/src/PIL/AvifImagePlugin.py index 17a145867f3..2b205c4a53a 100644 --- a/src/PIL/AvifImagePlugin.py +++ b/src/PIL/AvifImagePlugin.py @@ -168,7 +168,7 @@ def _save( autotiling = bool(info.get("autotiling", tile_rows_log2 == tile_cols_log2 == 0)) icc_profile = info.get("icc_profile", im.info.get("icc_profile")) - exif = info.get("exif", im.info.get("exif")) + exif = info.get("exif") if exif: if isinstance(exif, Image.Exif): exif_data = exif @@ -180,7 +180,7 @@ def _save( else: exif_orientation = 1 - xmp = info.get("xmp", im.info.get("xmp") or im.info.get("XML:com.adobe.xmp")) + xmp = info.get("xmp") if isinstance(xmp, str): xmp = xmp.encode("utf-8")