Skip to content

Commit 5d8dacf

Browse files
authored
Merge pull request #2 from radarhere/xmp-tags-orientation
Check that orientation is still absent after reloading Exif
2 parents cce09b7 + bac83f7 commit 5d8dacf

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed
-677 Bytes
Loading

Tests/test_imageops.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,18 +345,15 @@ def check(orientation_im):
345345
check(orientation_im)
346346

347347
# Orientation from "XML:com.adobe.xmp" info key
348-
with Image.open("Tests/images/xmp_tags_orientation.png") as im:
349-
assert im.getexif()[0x0112] == 3
350-
351-
transposed_im = ImageOps.exif_transpose(im)
352-
assert 0x0112 not in transposed_im.getexif()
348+
for suffix in ("", "_exiftool"):
349+
with Image.open("Tests/images/xmp_tags_orientation" + suffix + ".png") as im:
350+
assert im.getexif()[0x0112] == 3
353351

354-
# Orientation from "XML:com.adobe.xmp" info key (from exiftool)
355-
with Image.open("Tests/images/xmp_tags_orientation_exiftool.png") as im:
356-
assert im.getexif()[0x0112] == 8
352+
transposed_im = ImageOps.exif_transpose(im)
353+
assert 0x0112 not in transposed_im.getexif()
357354

358-
transposed_im = ImageOps.exif_transpose(im)
359-
assert 0x0112 not in transposed_im.getexif()
355+
transposed_im._reload_exif()
356+
assert 0x0112 not in transposed_im.getexif()
360357

361358
# Orientation from "Raw profile type exif" info key
362359
# This test image has been manually hexedited from exif_imagemagick.png

0 commit comments

Comments
 (0)