a test that fails for images with integer resolution

This commit is contained in:
Matti Picus 2013-05-07 23:23:51 +03:00
parent eee43319bb
commit 5ca04bb728
2 changed files with 20 additions and 11 deletions

View File

@ -60,4 +60,13 @@ def test_gimp_tiff():
])
assert_no_exception(lambda: im.load())
def test_xyres_tiff():
from PIL.TiffImagePlugin import X_RESOLUTION, Y_RESOLUTION
file = "Tests/images/pil168.tif"
im = Image.open(file)
assert isinstance(im.tag.tags[X_RESOLUTION][0], tuple)
assert isinstance(im.tag.tags[Y_RESOLUTION][0], tuple)
#Try to read a file where X,Y_RESOLUTION are ints
im.tag.tags[X_RESOLUTION] = (72,)
im.tag.tags[Y_RESOLUTION] = (72,)
im._setup()