Changeset 3643
- Timestamp:
- 19/10/08 16:16:11 (3 months ago)
- Files:
-
- 1 modified
-
trunk/metadata/src/image/EXIF.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/metadata/src/image/EXIF.py
r3360 r3643 1249 1249 1250 1250 # add pixel strips and update strip offset info 1251 old_offsets = self.tags['Thumbnail StripOffsets'].values 1252 old_counts = self.tags['Thumbnail StripByteCounts'].values 1251 # kaa.metadata addition: wrap key access in try/except in case 1252 # keys do not exist, in which case we cannot extract TIFF thumbnail 1253 try: 1254 old_offsets = self.tags['Thumbnail StripOffsets'].values 1255 old_counts = self.tags['Thumbnail StripByteCounts'].values 1256 except KeyError: 1257 return 1258 1253 1259 for i in range(len(old_offsets)): 1254 1260 # update offset pointer (more nasty "strings are immutable" crap) … … 1465 1471 1466 1472 # deal with MakerNote contained in EXIF IFD 1467 if 'EXIF MakerNote' in hdr.tags and detailed: 1473 # kaa.metadata addition: also test 'Image Make' in hdr.tags before 1474 # calling decode_maker_note(). 1475 if 'EXIF MakerNote' in hdr.tags and 'Image Make' in hdr.tags and detailed: 1468 1476 hdr.decode_maker_note() 1469 1477
