Capitalisation

This commit is contained in:
Andrew Murray 2019-03-05 18:11:46 +11:00
parent 9cbc4b1e3c
commit e6a7dc8bb4
2 changed files with 4 additions and 4 deletions

View File

@ -735,7 +735,7 @@ class Exif(MutableMapping):
info.load(fp) info.load(fp)
self._data = dict(self._fixup_dict(info)) self._data = dict(self._fixup_dict(info))
# get exif extension # get EXIF extension
ifd = self._get_ifd_dict(fp, head, 0x8769) ifd = self._get_ifd_dict(fp, head, 0x8769)
if ifd: if ifd:
self._data.update(ifd) self._data.update(ifd)

View File

@ -86,7 +86,7 @@ def APP(self, marker):
self.info["jfif_density"] = jfif_density self.info["jfif_density"] = jfif_density
elif marker == 0xFFE1 and s[:5] == b"Exif\0": elif marker == 0xFFE1 and s[:5] == b"Exif\0":
if "exif" not in self.info: if "exif" not in self.info:
# extract Exif information (incomplete) # extract EXIF information (incomplete)
self.info["exif"] = s # FIXME: value will change self.info["exif"] = s # FIXME: value will change
elif marker == 0xFFE2 and s[:5] == b"FPXR\0": elif marker == 0xFFE2 and s[:5] == b"FPXR\0":
# extract FlashPix information (incomplete) # extract FlashPix information (incomplete)
@ -168,7 +168,7 @@ def APP(self, marker):
dpi *= 2.54 dpi *= 2.54
self.info["dpi"] = dpi, dpi self.info["dpi"] = dpi, dpi
except (KeyError, SyntaxError, ZeroDivisionError): except (KeyError, SyntaxError, ZeroDivisionError):
# SyntaxError for invalid/unreadable exif # SyntaxError for invalid/unreadable EXIF
# KeyError for dpi not included # KeyError for dpi not included
# ZeroDivisionError for invalid dpi rational value # ZeroDivisionError for invalid dpi rational value
self.info["dpi"] = 72, 72 self.info["dpi"] = 72, 72
@ -757,7 +757,7 @@ def _save(im, fp, filename):
else: else:
bufsize = im.size[0] * im.size[1] bufsize = im.size[0] * im.size[1]
# The exif info needs to be written as one block, + APP1, + one spare byte. # The EXIF info needs to be written as one block, + APP1, + one spare byte.
# Ensure that our buffer is big enough. Same with the icc_profile block. # Ensure that our buffer is big enough. Same with the icc_profile block.
bufsize = max(ImageFile.MAXBLOCK, bufsize, len(exif) + 5, bufsize = max(ImageFile.MAXBLOCK, bufsize, len(exif) + 5,
len(extra) + 1) len(extra) + 1)