File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1565,7 +1565,7 @@ def get_child_images(self) -> list[ImageFile.ImageFile]:
15651565 for subifd_offset in subifd_offsets :
15661566 ifds .append ((exif ._get_ifd_dict (subifd_offset ), subifd_offset ))
15671567 ifd1 = exif .get_ifd (ExifTags .IFD .IFD1 )
1568- if ifd1 and ifd1 .get (513 ):
1568+ if ifd1 and ifd1 .get (ExifTags . Base . JpegIFOffset ):
15691569 assert exif ._info is not None
15701570 ifds .append ((ifd1 , exif ._info .next ))
15711571
@@ -1577,11 +1577,11 @@ def get_child_images(self) -> list[ImageFile.ImageFile]:
15771577
15781578 fp = self .fp
15791579 if ifd is not None :
1580- thumbnail_offset = ifd .get (513 )
1580+ thumbnail_offset = ifd .get (ExifTags . Base . JpegIFOffset )
15811581 if thumbnail_offset is not None :
15821582 thumbnail_offset += getattr (self , "_exif_offset" , 0 )
15831583 self .fp .seek (thumbnail_offset )
1584- data = self .fp .read (ifd .get (514 ))
1584+ data = self .fp .read (ifd .get (ExifTags . Base . JpegIFByteCount ))
15851585 fp = io .BytesIO (data )
15861586
15871587 with open (fp ) as im :
You can’t perform that action at this time.
0 commit comments