mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 02:06:18 +03:00
Rearranged comments
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
b84c970fbf
commit
88cd6d41ef
|
@ -487,18 +487,13 @@ class JpegImageFile(ImageFile.ImageFile):
|
||||||
dpi *= 2.54
|
dpi *= 2.54
|
||||||
self.info["dpi"] = dpi, dpi
|
self.info["dpi"] = dpi, dpi
|
||||||
except (
|
except (
|
||||||
struct.error,
|
struct.error, # truncated EXIF
|
||||||
KeyError,
|
KeyError, # dpi not included
|
||||||
SyntaxError,
|
SyntaxError, # invalid/unreadable EXIF
|
||||||
TypeError,
|
TypeError, # dpi is an invalid float
|
||||||
ValueError,
|
ValueError, # dpi is an invalid float
|
||||||
ZeroDivisionError,
|
ZeroDivisionError, # invalid dpi rational value
|
||||||
):
|
):
|
||||||
# struct.error for truncated EXIF
|
|
||||||
# KeyError for dpi not included
|
|
||||||
# SyntaxError for invalid/unreadable EXIF
|
|
||||||
# ValueError or TypeError for dpi being an invalid float
|
|
||||||
# ZeroDivisionError for invalid dpi rational value
|
|
||||||
self.info["dpi"] = 72, 72
|
self.info["dpi"] = 72, 72
|
||||||
|
|
||||||
def _getmp(self):
|
def _getmp(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user