165 |
165 |
const TagInfo CanonMakerNote::tagInfo_[] = {
|
166 |
166 |
TagInfo(0x0000, "0x0000", "0x0000", N_("Unknown"), canonIfdId, makerTags, unsignedShort, printValue),
|
167 |
167 |
TagInfo(0x0001, "CameraSettings", N_("Camera Settings"), N_("Various camera settings"), canonIfdId, makerTags, unsignedShort, printValue),
|
168 |
|
TagInfo(0x0002, "0x0002", "0x0002", N_("Unknown"), canonIfdId, makerTags, unsignedShort, printValue),
|
|
168 |
TagInfo(0x0002, "FocalLength", N_("Focal Length"), N_("Focal length"), canonIfdId, makerTags, unsignedShort, printFocalLength),
|
169 |
169 |
TagInfo(0x0003, "0x0003", "0x0003", N_("Unknown"), canonIfdId, makerTags, unsignedShort, printValue),
|
170 |
170 |
TagInfo(0x0004, "ShotInfo", N_("Shot Info"), N_("Shot information"), canonIfdId, makerTags, unsignedShort, printValue),
|
171 |
171 |
TagInfo(0x0005, "Panorama", N_("Panorama"), N_("Panorama"), canonIfdId, makerTags, unsignedShort, printValue),
|
... | ... | |
875 |
875 |
return tagInfoPi_;
|
876 |
876 |
}
|
877 |
877 |
|
|
878 |
std::ostream& CanonMakerNote::printFocalLength(std::ostream& os,
|
|
879 |
const Value& value,
|
|
880 |
const ExifData* metadata)
|
|
881 |
{
|
|
882 |
if ( value.count() < 4
|
|
883 |
|| value.typeId() != unsignedShort) {
|
|
884 |
return os << "(" << value << ")";
|
|
885 |
}
|
|
886 |
|
|
887 |
ExifKey key("Exif.CanonCs.Lens");
|
|
888 |
ExifData::const_iterator pos = metadata->findKey(key);
|
|
889 |
if ( pos != metadata->end()
|
|
890 |
&& pos->value().count() >= 3
|
|
891 |
&& pos->value().typeId() == unsignedShort) {
|
|
892 |
float fu = pos->value().toFloat(2);
|
|
893 |
if (fu != 0.0) {
|
|
894 |
float fl = value.toFloat(1) / fu;
|
|
895 |
std::ostringstream oss;
|
|
896 |
oss.copyfmt(os);
|
|
897 |
os << std::fixed << std::setprecision(1);
|
|
898 |
os << fl << " mm";
|
|
899 |
os.copyfmt(oss);
|
|
900 |
return os;
|
|
901 |
}
|
|
902 |
}
|
|
903 |
}
|
|
904 |
|
878 |
905 |
std::ostream& CanonMakerNote::print0x0008(std::ostream& os,
|
879 |
906 |
const Value& value,
|
880 |
907 |
const ExifData*)
|