mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Merge pull request #2 from radarhere/xmp-tags-orientation
Check that orientation is still absent after reloading Exif
This commit is contained in:
commit
5d8dacf962
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -345,18 +345,15 @@ 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:
|
||||
assert im.getexif()[0x0112] == 3
|
||||
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()
|
||||
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()
|
||||
transposed_im._reload_exif()
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user