Commit cf4110f 1 parent e7e5420 commit cf4110f Copy full SHA for cf4110f
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1565,7 +1565,7 @@ def get_child_images(self) -> list[ImageFile.ImageFile]:
1565
1565
for subifd_offset in subifd_offsets :
1566
1566
ifds .append ((exif ._get_ifd_dict (subifd_offset ), subifd_offset ))
1567
1567
ifd1 = exif .get_ifd (ExifTags .IFD .IFD1 )
1568
- if ifd1 and ifd1 .get (513 ):
1568
+ if ifd1 and ifd1 .get (ExifTags . Base . JpegIFOffset ):
1569
1569
assert exif ._info is not None
1570
1570
ifds .append ((ifd1 , exif ._info .next ))
1571
1571
@@ -1577,11 +1577,11 @@ def get_child_images(self) -> list[ImageFile.ImageFile]:
1577
1577
1578
1578
fp = self .fp
1579
1579
if ifd is not None :
1580
- thumbnail_offset = ifd .get (513 )
1580
+ thumbnail_offset = ifd .get (ExifTags . Base . JpegIFOffset )
1581
1581
if thumbnail_offset is not None :
1582
1582
thumbnail_offset += getattr (self , "_exif_offset" , 0 )
1583
1583
self .fp .seek (thumbnail_offset )
1584
- data = self .fp .read (ifd .get (514 ))
1584
+ data = self .fp .read (ifd .get (ExifTags . Base . JpegIFByteCount ))
1585
1585
fp = io .BytesIO (data )
1586
1586
1587
1587
with open (fp ) as im :
You can’t perform that action at this time.
0 commit comments