Simplified test code

This commit is contained in:
Andrew Murray 2022-07-27 22:18:39 +10:00
parent cce09b713d
commit 7e1261c6a0
2 changed files with 5 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -345,19 +345,13 @@ def test_exif_transpose():
check(orientation_im)
# Orientation from "XML:com.adobe.xmp" info key
with Image.open("Tests/images/xmp_tags_orientation.png") as im:
for suffix in ("", "_exiftool"):
with Image.open("Tests/images/xmp_tags_orientation" + suffix + ".png") as im:
assert im.getexif()[0x0112] == 3
transposed_im = ImageOps.exif_transpose(im)
assert 0x0112 not in transposed_im.getexif()
# Orientation from "XML:com.adobe.xmp" info key (from exiftool)
with Image.open("Tests/images/xmp_tags_orientation_exiftool.png") as im:
assert im.getexif()[0x0112] == 8
transposed_im = ImageOps.exif_transpose(im)
assert 0x0112 not in transposed_im.getexif()
# Orientation from "Raw profile type exif" info key
# This test image has been manually hexedited from exif_imagemagick.png
# to have a different orientation