diff --git a/Tests/images/hopper_jpg.tif b/Tests/images/hopper_jpg.tif new file mode 100644 index 000000000..fee98f5ec Binary files /dev/null and b/Tests/images/hopper_jpg.tif differ diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index a0e34439d..84fdd0f49 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -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()