wiredfool 2017-07-18 01:06:54 -07:00
parent 7a8161162f
commit 908fffdd2c
2 changed files with 9 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -546,6 +546,15 @@ class TestFileJpeg(PillowTestCase):
# http://www.exiv2.org/tags.html # http://www.exiv2.org/tags.html
self.assertEqual(im.info.get("dpi"), (72, 72)) self.assertEqual(im.info.get("dpi"), (72, 72))
def test_invalid_exif(self):
# This is no-dpi-in-exif with the tiff header of the exif block
# hexedited from MM * to FF FF FF FF
im = Image.open("Tests/images/invalid-exif.jpg")
# This should return the default, and not a SyntaxError or
# OSError for unidentified image.
self.assertEqual(im.info.get("dpi"), (72, 72))
@unittest.skipUnless(sys.platform.startswith('win32'), "Windows only") @unittest.skipUnless(sys.platform.startswith('win32'), "Windows only")
class TestFileCloseW32(PillowTestCase): class TestFileCloseW32(PillowTestCase):