mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
This commit is contained in:
parent
7a8161162f
commit
908fffdd2c
BIN
Tests/images/invalid-exif.jpg
Normal file
BIN
Tests/images/invalid-exif.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -546,6 +546,15 @@ class TestFileJpeg(PillowTestCase):
|
|||
# http://www.exiv2.org/tags.html
|
||||
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")
|
||||
class TestFileCloseW32(PillowTestCase):
|
||||
|
|
Loading…
Reference in New Issue
Block a user