Test getting DPI from EXIF

This commit is contained in:
Hugo 2017-03-14 11:26:11 +02:00
parent 8b649d6e79
commit 92acfca46f
2 changed files with 10 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -500,6 +500,14 @@ class TestFileJpeg(PillowTestCase):
reloaded.load()
self.assertEqual(im.info['dpi'], reloaded.info['dpi'])
def test_dpi_from_exif(self):
# Arrange
# This Photoshop CC 2017 image has DPI in EXIF not metadata
im = Image.open("Tests/images/photoshop-200dpi.jpg")
# Act / Assert
self.assertEqual(im.info.get("dpi"), 200)
if __name__ == '__main__':
unittest.main()