Skip to content

Commit

Permalink
Test saving EXIF instance without orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 24, 2024
1 parent 5b5d344 commit a8bd8e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/test_file_avif.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,18 @@ def test_exif_save(
else:
assert reloaded.info["exif"] == exif_data

def test_exif_without_orientation(self, tmp_path: Path):
exif = Image.Exif()
exif[272] = b"test"
exif_data = exif.tobytes()
with Image.open(TEST_AVIF_FILE) as im:
test_file = str(tmp_path / "temp.avif")
im.save(test_file, exif=exif)

with Image.open(test_file) as reloaded:
assert reloaded.info["exif"] == exif_data


def test_exif_invalid(self, tmp_path: Path) -> None:
with Image.open(TEST_AVIF_FILE) as im:
test_file = str(tmp_path / "temp.avif")
Expand Down

0 comments on commit a8bd8e9

Please sign in to comment.