@@ -490,7 +490,7 @@ constexpr TagInfo CanonMakerNote::tagInfo_[] = {
490490 {0x0009 , " OwnerName" , N_ (" Owner Name" ), N_ (" Owner Name" ), IfdId::canonId, SectionId::makerTags, asciiString, -1 ,
491491 printValue},
492492 {0x000a , " 0x000a" , N_ (" 0x000a" ), N_ (" Unknown" ), IfdId::canonId, SectionId::makerTags, unsignedLong, -1 ,
493- print0x000c },
493+ print0x000a },
494494 {0x000c , " SerialNumber" , N_ (" Serial Number" ), N_ (" Camera serial number" ), IfdId::canonId, SectionId::makerTags,
495495 unsignedLong, -1 , print0x000c},
496496 {0x000d , " CameraInfo" , N_ (" Camera Info" ), N_ (" Camera info" ), IfdId::canonId, SectionId::makerTags, unsignedShort,
@@ -2811,14 +2811,30 @@ std::ostream& CanonMakerNote::print0x0008(std::ostream& os, const Value& value,
28112811 return os << n.substr (0 , n.length () - 4 ) << " -" << n.substr (n.length () - 4 );
28122812}
28132813
2814- std::ostream& CanonMakerNote::print0x000c (std::ostream& os, const Value& value, const ExifData*) {
2814+ std::ostream& CanonMakerNote::print0x000a (std::ostream& os, const Value& value, const ExifData*) {
28152815 std::istringstream is (value.toString ());
28162816 uint32_t l = 0 ;
28172817 is >> l;
28182818 return os << std::setw (4 ) << std::setfill (' 0' ) << std::hex << ((l & 0xffff0000 ) >> 16 ) << std::setw (5 )
28192819 << std::setfill (' 0' ) << std::dec << (l & 0x0000ffff );
28202820}
28212821
2822+ std::ostream& CanonMakerNote::print0x000c (std::ostream& os, const Value& value, const ExifData* exifData) {
2823+ std::istringstream is (value.toString ());
2824+
2825+ ExifKey key (" Exif.Canon.ModelID" );
2826+ auto pos = exifData->findKey (key);
2827+ // if model is EOS D30
2828+ if (pos != exifData->end () && pos->value ().count () == 1 && pos->value ().toInt64 () == 0x01140000 ) {
2829+ uint32_t l = 0 ;
2830+ is >> l;
2831+ return os << std::setw (4 ) << std::setfill (' 0' ) << std::hex << ((l & 0xffff0000 ) >> 16 ) << std::setw (5 )
2832+ << std::setfill (' 0' ) << std::dec << (l & 0x0000ffff );
2833+ } else {
2834+ return os << value;
2835+ }
2836+ }
2837+
28222838std::ostream& CanonMakerNote::printCs0x0002 (std::ostream& os, const Value& value, const ExifData*) {
28232839 if (value.typeId () != unsignedShort || value.count () == 0 )
28242840 return os << value;
0 commit comments