Do not add _getexif to new plugin

This commit is contained in:
Andrew Murray 2025-05-07 18:36:14 +10:00
parent 9266318048
commit 29e4b558d7
2 changed files with 2 additions and 8 deletions

View File

@ -35,7 +35,7 @@ def test_read_exif_metadata() -> None:
exif_data = image.info.get("exif", None)
assert exif_data
exif = image._getexif()
exif = image.getexif()
# Camera make
assert exif[271] == "Canon"
@ -123,4 +123,4 @@ def test_4_byte_exif(monkeypatch: pytest.MonkeyPatch) -> None:
def test_read_exif_metadata_empty() -> None:
with Image.open("Tests/images/hopper.jxl") as image:
assert image._getexif() is None
assert image.getexif() == {}

View File

@ -2,7 +2,6 @@ from __future__ import annotations
import struct
from io import BytesIO
from typing import Any
from . import Image, ImageFile
@ -77,11 +76,6 @@ class JpegXlImageFile(ImageFile.ImageFile):
self._rewind()
def _getexif(self) -> dict[int, Any] | None:
if "exif" not in self.info:
return None
return self.getexif()._get_merged_dict()
def _get_next(self) -> tuple[bytes, float, float, bool]:
# Get next frame