Merge pull request #1804 from hugovk/tiff_jpegtables

Test saving TIFF with JPEGTables tag
This commit is contained in:
wiredfool 2016-04-04 05:06:53 -07:00
commit bb91abe147
2 changed files with 13 additions and 0 deletions

BIN
Tests/images/hopper_jpg.tif Normal file

Binary file not shown.

View File

@ -437,6 +437,19 @@ class TestFileTiff(PillowTestCase):
self.assertEqual(im.size, (10, 10))
im.load()
def test_save_tiff_with_jpegtables(self):
# Arrange
outfile = self.tempfile("temp.tif")
# Created with ImageMagick: convert hopper.jpg hopper_jpg.tif
# Contains JPEGTables (347) tag
infile = "Tests/images/hopper_jpg.tif"
im = Image.open(infile)
# Act / Assert
# Should not raise UnicodeDecodeError or anything else
im.save(outfile)
if __name__ == '__main__':
unittest.main()