File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,14 @@ void Cr3Decoder::decodeMetaDataInternal(const CameraMetaData* meta) {
563563 iso = canonBox->CMT2 ()
564564 ->mRootIFD0 ->getEntryRecursive (ISOSPEEDRATINGS)
565565 ->getU32 ();
566+ if (65535 == iso) {
567+ // ISOSPEEDRATINGS is a SHORT EXIF value. For larger values, we have to look
568+ // at RECOMMENDED_EXPOSURE_INDEX (maybe Canon specific).
569+ if (canonBox->CMT2 ()->mRootIFD0 ->hasEntryRecursive (RECOMMENDED_EXPOSURE_INDEX))
570+ iso = canonBox->CMT2 ()
571+ ->mRootIFD0 ->getEntryRecursive (RECOMMENDED_EXPOSURE_INDEX)
572+ ->getU32 ();
573+ }
566574
567575 // Big raw image is always in track 4
568576 assert (rootBox->moov ()->tracks .size () >= 4 );
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ enum TiffTag {
158158 GPSINFOIFDPOINTER = 0x8825 ,
159159 ISOSPEEDRATINGS = 0x8827 ,
160160 OECF = 0x8828 ,
161+ RECOMMENDED_EXPOSURE_INDEX = 0x8832 ,
161162 EXIFVERSION = 0x9000 ,
162163 DATETIMEORIGINAL = 0x9003 ,
163164 DATETIMEDIGITIZED = 0x9004 ,
You can’t perform that action at this time.
0 commit comments