def extract_jpeg_thumbnail(self):
        thumb_offset = self.tags.get('Thumbnail JPEGInterchangeFormat')
        if thumb_offset:
            self.file.seek(self.offset + thumb_offset.values[0])
            size = self.tags['Thumbnail JPEGInterchangeFormatLength'].values[0]
            self.tags['JPEGThumbnail'] = self.file.read(size)

        # Sometimes in a TIFF file, a JPEG thumbnail is hidden in the MakerNote
        # since it's not allowed in a uncompressed TIFF IFD
        if 'JPEGThumbnail' not in self.tags:
            thumb_offset = self.tags.get('MakerNote JPEGThumbnail')
            if thumb_offset:
                self.file.seek(self.offset + thumb_offset.values[0])
                self.tags['JPEGThumbnail'] = self.file.read(thumb_offset.field_length)
Returns an AttrDict initialized from the given string, which
dataset/ETHPy150Open ianare/exif-py/exifread/classes.py/ExifHeader.extract_jpeg_thumbnail--crossover with--dataset/ETHPy150Open calliope-project/calliope/calliope/utils.py/AttrDict.from_yaml_string