From e60683e3b1ee8ca6f9b1a061e6b7292def08e612 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 26 Oct 2014 11:21:02 +0200 Subject: [PATCH] Test opening TIFF with JPEGTables and saving it --- Tests/test_file_tiff.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index cf809d5d0..472ed167a 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -298,6 +298,19 @@ class TestFileTiff(PillowTestCase): # Assert self.assertEqual(ret, [0, 1]) + 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()