Updated return type

This commit is contained in:
Andrew Murray 2025-01-09 15:11:06 +11:00
parent 66fe28956b
commit 0572221299
2 changed files with 3 additions and 6 deletions

View File

@ -1125,8 +1125,6 @@ class TestFileLibTiff(LibTiffTestCase):
for i in range(2, 9):
with Image.open("Tests/images/g4_orientation_" + str(i) + ".tif") as im:
transposed_im = ImageOps.exif_transpose(im)
assert transposed_im is not None
assert_image_similar(base_im, transposed_im, 0.7)
@pytest.mark.parametrize(

View File

@ -440,11 +440,10 @@ def test_exif_transpose() -> None:
# Orientation from "Raw profile type exif" info key
# This test image has been manually hexedited from exif_imagemagick.png
# to have a different orientation
with Image.open("Tests/images/exif_imagemagick_orientation.png") as img:
assert img.getexif()[0x0112] == 3
with Image.open("Tests/images/exif_imagemagick_orientation.png") as im:
assert im.getexif()[0x0112] == 3
transposed_im = ImageOps.exif_transpose(img)
assert transposed_im is not None
transposed_im = ImageOps.exif_transpose(im)
assert 0x0112 not in transposed_im.getexif()
# Orientation set directly on Image.Exif