mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Do not attempt to read IFD1 if absent
This commit is contained in:
parent
a7f8e862cb
commit
1e3f3ab596
|
@ -3687,7 +3687,7 @@ class Exif(MutableMapping):
|
||||||
def get_ifd(self, tag):
|
def get_ifd(self, tag):
|
||||||
if tag not in self._ifds:
|
if tag not in self._ifds:
|
||||||
if tag == ExifTags.IFD.IFD1:
|
if tag == ExifTags.IFD.IFD1:
|
||||||
if self._info is not None:
|
if self._info is not None and self._info.next != 0:
|
||||||
self._ifds[tag] = self._get_ifd_dict(self._info.next)
|
self._ifds[tag] = self._get_ifd_dict(self._info.next)
|
||||||
elif tag in [ExifTags.IFD.Exif, ExifTags.IFD.GPSInfo]:
|
elif tag in [ExifTags.IFD.Exif, ExifTags.IFD.GPSInfo]:
|
||||||
offset = self._hidden_data.get(tag, self.get(tag))
|
offset = self._hidden_data.get(tag, self.get(tag))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user