Skip to content

Commit

Permalink
Merge pull request #1804 from hugovk/tiff_jpegtables
Browse files Browse the repository at this point in the history
Test saving TIFF with JPEGTables tag
  • Loading branch information
wiredfool committed Apr 4, 2016
2 parents 6899adc + ba817af commit bb91abe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added Tests/images/hopper_jpg.tif
Binary file not shown.
13 changes: 13 additions & 0 deletions Tests/test_file_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,19 @@ def test_multipage_compression(self):
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()

Expand Down

0 comments on commit bb91abe

Please sign in to comment.