diff --git a/src/librawspeed/decoders/Cr3Decoder.cpp b/src/librawspeed/decoders/Cr3Decoder.cpp index e26bf1c8e..0b1c491d1 100644 --- a/src/librawspeed/decoders/Cr3Decoder.cpp +++ b/src/librawspeed/decoders/Cr3Decoder.cpp @@ -563,6 +563,14 @@ void Cr3Decoder::decodeMetaDataInternal(const CameraMetaData* meta) { iso = canonBox->CMT2() ->mRootIFD0->getEntryRecursive(ISOSPEEDRATINGS) ->getU32(); + if(65535 == iso) { + // ISOSPEEDRATINGS is a SHORT EXIF value. For larger values, we have to look + // at RECOMMENDED_EXPOSURE_INDEX (maybe Canon specific). + if (canonBox->CMT2()->mRootIFD0->hasEntryRecursive(RECOMMENDED_EXPOSURE_INDEX)) + iso = canonBox->CMT2() + ->mRootIFD0->getEntryRecursive(RECOMMENDED_EXPOSURE_INDEX) + ->getU32(); + } // Big raw image is always in track 4 assert(rootBox->moov()->tracks.size() >= 4); diff --git a/src/librawspeed/tiff/TiffTag.h b/src/librawspeed/tiff/TiffTag.h index 4c973d206..a8342a78f 100644 --- a/src/librawspeed/tiff/TiffTag.h +++ b/src/librawspeed/tiff/TiffTag.h @@ -158,6 +158,7 @@ enum TiffTag { GPSINFOIFDPOINTER = 0x8825, ISOSPEEDRATINGS = 0x8827, OECF = 0x8828, + RECOMMENDED_EXPOSURE_INDEX = 0x8832, EXIFVERSION = 0x9000, DATETIMEORIGINAL = 0x9003, DATETIMEDIGITIZED = 0x9004,