diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 8250eab60..b3b454ae2 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -213,11 +213,17 @@ void ImageData::extractInfo () { // guess lens... lens = "Unknown"; - // Sometimes (e.g. DNG) EXIF already contains lens data - - if (exif->getTag ("MakerNote")) { - rtexif::TagDirectory* mnote = exif->getTag ("MakerNote")->getDirectory(); + // Sometimes (e.g. DNG) EXIF already contains lens data + + if (root->findTag("MakerNote")) { + rtexif::TagDirectory* mnote = root->findTag("MakerNote")->getDirectory(); if (mnote && !make.compare (0, 5, "NIKON")) { + // ISO at max value supported, check manufacturer specific + if (iso_speed == 65535 || iso_speed == 0) { + rtexif::Tag* isoTag = mnote->getTagP("ISOInfo/ISO"); + if (isoTag) + iso_speed = isoTag->toInt(); + } bool lensOk = false; if (mnote->getTag ("LensData")) { std::string ldata = mnote->getTag ("LensData")->valueToString (); @@ -252,22 +258,28 @@ void ImageData::extractInfo () { } } else if (mnote && !make.compare (0, 5, "Canon")) { - int found=false; - // canon EXIF have a string for lens model - rtexif::Tag *lt = mnote->getTag("LensType"); + // ISO at max value supported, check manufacturer specific + if (iso_speed == 65535 || iso_speed == 0) { + rtexif::Tag* baseIsoTag = mnote->getTagP("CanonShotInfo/BaseISO"); + if (baseIsoTag) + iso_speed = baseIsoTag->toInt(); + } + int found=false; + // canon EXIF have a string for lens model + rtexif::Tag *lt = mnote->getTag("LensType"); if ( lt ) { std::string ldata = lt->valueToString (); if (ldata.size()>1) { - found=true; + found=true; lens = "Canon " + ldata; } } if( !found || lens.substr(lens.find(' ')).length() < 7 ){ - lt = mnote->findTag("LensID"); + lt = mnote->findTag("LensID"); if ( lt ) { std::string ldata = lt->valueToString (); if (ldata.size()>1) { - lens = ldata; + lens = ldata; } } } @@ -275,6 +287,18 @@ void ImageData::extractInfo () { else if (mnote && !make.compare (0, 6, "PENTAX")) { if (mnote->getTag ("LensType")) lens = mnote->getTag ("LensType")->valueToString (); + + // Try to get the FocalLength from the LensInfo structure, where length below 10mm will be correctly set + rtexif::Tag* flt=mnote->getTagP ("LensInfo/FocalLength"); + if (flt) + focal_len = flt->toDouble (); + else if ((flt = mnote->getTagP ("FocalLength"))) { + rtexif::Tag* flt = mnote->getTag ("FocalLength"); + focal_len = flt->toDouble (); + } + + if (mnote->getTag ("FocalLengthIn35mmFilm")) + focal_len35mm = mnote->getTag ("FocalLengthIn35mmFilm")->toDouble (); } else if (mnote && (!make.compare (0, 4, "SONY") || !make.compare (0, 6, "KONICA"))) { if (mnote->getTag ("LensID")) @@ -288,11 +312,11 @@ void ImageData::extractInfo () { } } } else if (exif->getTag ("DNGLensInfo")) { - lens = exif->getTag ("DNGLensInfo")->valueToString (); + lens = exif->getTag ("DNGLensInfo")->valueToString (); } else if (exif->getTag ("LensModel")) { - lens = exif->getTag ("LensModel")->valueToString (); - } else if (exif->getTag ("LensInfo")) { - lens = exif->getTag ("LensInfo")->valueToString (); + lens = exif->getTag ("LensModel")->valueToString (); + } else if (exif->getTag ("LensInfo")) { + lens = exif->getTag ("LensInfo")->valueToString (); } } } diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index 3115887c8..cadcbbf3d 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -406,30 +406,31 @@ CAFocalInterpreter caFocalInterpreter; class CALensInterpreter : public IntLensInterpreter< int > { public: - CALensInterpreter () { - choices.insert(p_t(1, "Canon EF 50mm f/1.8")); + CALensInterpreter () { // From EXIFTOOL database 'Canon.pm' V3.19 + choices.insert(p_t(1, "Canon EF 50mm f/1.8")); choices.insert(p_t(2, "Canon EF 28mm f/2.8")); choices.insert(p_t(3, "Canon EF 135mm f/2.8 Soft")); choices.insert(p_t(4, "Canon EF 35-105mm f/3.5-4.5")); - choices.insert(p_t(4, "Sigma UC Zoom 35.135mm f/4-5.6")); + choices.insert(p_t(4, "Sigma UC Zoom 35-135mm f/4-5.6")); choices.insert(p_t(5, "Canon EF 35-70mm f/3.5-4.5")); choices.insert(p_t(6, "Canon EF 28-70mm f/3.5-4.5")); choices.insert(p_t(6, "Sigma 18-50mm f/3.5-5.6 DC")); choices.insert(p_t(6, "Sigma 18-125mm f/3.5-5.6 DC IF ASP")); - choices.insert(p_t(6, "Sigma 28-80mm f/3.5-5.6 II Macro")); choices.insert(p_t(6, "Tokina AF 193-2 19-35mm f/3.5-4.5")); + choices.insert(p_t(6, "Sigma 28-80mm f/3.5-5.6 II Macro")); choices.insert(p_t(7, "Canon EF 100-300mm f/5.6L")); choices.insert(p_t(8, "Canon EF 100-300mm f/5.6")); - choices.insert(p_t(8, "Sigma 70-300mm f/4-5.6 APO DG Macro")); - choices.insert(p_t(8, "Tokina AT-X242AF 24-200mm f/3.5-5.6")); + choices.insert(p_t(8, "Sigma 70-300mm f/4-5.6 [APO] DG Macro")); + choices.insert(p_t(8, "Tokina AT-X 242 AF 24-200mm f/3.5-5.6")); choices.insert(p_t(9, "Canon EF 70-210mm f/4")); choices.insert(p_t(9, "Sigma 55-200mm f/4-5.6 DC")); choices.insert(p_t(10, "Canon EF 50mm f/2.5 Macro")); choices.insert(p_t(10, "Sigma 50mm f/2.8 EX")); choices.insert(p_t(10, "Sigma 28mm f/1.8")); choices.insert(p_t(10, "Sigma 105mm f/2.8 Macro EX")); + choices.insert(p_t(10, "Sigma 70mm f/2.8 EX DG Macro EF")); choices.insert(p_t(11, "Canon EF 35mm f/2")); - choices.insert(p_t(13, "Canon EF 15mm f/2.8")); + choices.insert(p_t(13, "Canon EF 15mm f/2.8 Fisheye")); choices.insert(p_t(14, "Canon EF 50-200mm f/3.5-4.5L")); choices.insert(p_t(15, "Canon EF 50-200mm f/3.5-4.5")); choices.insert(p_t(16, "Canon EF 35-135mm f/3.5-4.5")); @@ -438,7 +439,7 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(20, "Canon EF 100-200mm f/4.5A")); choices.insert(p_t(21, "Canon EF 80-200mm f/2.8L")); choices.insert(p_t(22, "Canon EF 20-35mm f/2.8L")); - choices.insert(p_t(22, "Tokina AT-X280AF PRO 28-80mm f/2.8 Aspherical")); + choices.insert(p_t(22, "Tokina AT-X 280 AF Pro 28-80mm f/2.8 Aspherical")); choices.insert(p_t(23, "Canon EF 35-105mm f/3.5-4.5")); choices.insert(p_t(24, "Canon EF 35-80mm f/4-5.6 Power Zoom")); choices.insert(p_t(25, "Canon EF 35-80mm f/4-5.6 Power Zoom")); @@ -459,7 +460,12 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(31, "Tamron SP AF 300mm f/2.8 LD IF")); choices.insert(p_t(32, "Canon EF 24mm f/2.8")); choices.insert(p_t(32, "Sigma 15mm f/2.8 EX Fisheye")); + choices.insert(p_t(33, "Voigtlander or Carl Zeiss Lens")); choices.insert(p_t(33, "Voigtlander Ultron 40mm f/2 SLII Aspherical")); + choices.insert(p_t(33, "Carl Zeiss Distagon T* 15mm f/2.8 ZE")); + choices.insert(p_t(33, "Carl Zeiss Distagon T* 18mm f/3.5 ZE")); + choices.insert(p_t(33, "Carl Zeiss Distagon T* 21mm f/2.8 ZE")); + choices.insert(p_t(33, "Carl Zeiss Distagon T* 28mm f/2 ZE")); choices.insert(p_t(33, "Carl Zeiss Distagon T* 35mm f/2 ZE")); choices.insert(p_t(35, "Canon EF 35-80mm f/4-5.6")); choices.insert(p_t(36, "Canon EF 38-76mm f/4.5-5.6")); @@ -476,12 +482,15 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical IF Macro (A20)")); choices.insert(p_t(43, "Canon EF 28-105mm f/4-5.6")); choices.insert(p_t(44, "Canon EF 90-300mm f/4.5-5.6")); - choices.insert(p_t(45, "Canon EF-S 18-55mm f/3.5-5.6")); + choices.insert(p_t(45, "Canon EF-S 18-55mm f/3.5-5.6 II")); choices.insert(p_t(46, "Canon EF 28-90mm f/4-5.6")); choices.insert(p_t(48, "Canon EF-S 18-55mm f/3.5-5.6 IS")); choices.insert(p_t(49, "Canon EF-S 55-250mm f/4-5.6 IS")); choices.insert(p_t(50, "Canon EF-S 18-200mm f/3.5-5.6 IS")); choices.insert(p_t(51, "Canon EF-S 18-135mm f/3.5-5.6 IS")); + choices.insert(p_t(52, "Canon EF-S 18-55mm f/3.5-5.6 IS II")); + choices.insert(p_t(53, "Canon EF-S 18-55mm f/3.5-5.6 III")); + choices.insert(p_t(54, "Canon EF-S 55-250mm f/4-5.6 IS II")); choices.insert(p_t(94, "Canon TS-E 17mm f/4L")); choices.insert(p_t(95, "Canon TS-E 24mm f/3.5 L II")); choices.insert(p_t(124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo")); @@ -496,6 +505,8 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(131, "Sigma 17-70mm f/2.8-4.5 DC Macro")); choices.insert(p_t(131, "Sigma APO 50-150mm f/2.8 EX DC HSM II")); choices.insert(p_t(131, "Sigma APO 120-300mm f/2.8 EX DG HSM")); + choices.insert(p_t(131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye")); + choices.insert(p_t(131, "Sigma 70-200mm f/2.8 APO EX HSM")); choices.insert(p_t(132, "Canon EF 1200mm f/5.6L")); choices.insert(p_t(134, "Canon EF 600mm f/4L IS")); choices.insert(p_t(135, "Canon EF 200mm f/1.8L")); @@ -507,6 +518,14 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(137, "Sigma 24-70mm f/2.8 IF EX DG HSM")); choices.insert(p_t(137, "Sigma 18-125mm f/3.8-5.6 DC OS HSM")); choices.insert(p_t(137, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM")); + choices.insert(p_t(137, "Sigma 17-50mm f/2.8 OS HSM")); + choices.insert(p_t(137, "Sigma 18-200mm f/3.5-6.3 II DC OS HSM")); + choices.insert(p_t(137, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD")); + choices.insert(p_t(137, "Sigma 8-16mm f/4.5-5.6 DC HSM")); + choices.insert(p_t(137, "Tamron SP 17-50mm f/2.8 XR Di II VC")); + choices.insert(p_t(137, "Tamron SP 60mm f/2 Macro Di II")); + choices.insert(p_t(137, "Sigma 10-20mm f/3.5 EX DC HSM")); + choices.insert(p_t(137, "Tamron SP 24-70mm f/2.8 Di VC USD")); choices.insert(p_t(138, "Canon EF 28-80mm f/2.8-4L")); choices.insert(p_t(139, "Canon EF 400mm f/2.8L")); choices.insert(p_t(140, "Canon EF 500mm f/4.5L")); @@ -518,7 +537,7 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(146, "Canon EF 70-210mm f/3.5-4.5 USM")); choices.insert(p_t(147, "Canon EF 35-135mm f/4-5.6 USM")); choices.insert(p_t(148, "Canon EF 28-80mm f/3.5-5.6 USM")); - choices.insert(p_t(149, "Canon EF 100mm f/2")); + choices.insert(p_t(149, "Canon EF 100mm f/2 USM")); choices.insert(p_t(150, "Canon EF 14mm f/2.8L")); choices.insert(p_t(150, "Sigma 20mm f/1.8 EX")); choices.insert(p_t(150, "Sigma 24mm f/1.8 DG Macro EX")); @@ -530,7 +549,7 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(152, "Sigma 10-20mm f/4-5.6")); choices.insert(p_t(152, "Sigma 100-300mm f/4")); choices.insert(p_t(153, "Canon EF 35-350mm f/3.5-5.6L")); - choices.insert(p_t(153, "Sigma APO 50-500mm f/4-6.3 HSM EX")); + choices.insert(p_t(153, "Sigma 50-500mm f/4-6.3 APO HSM EX")); choices.insert(p_t(153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical IF Macro")); choices.insert(p_t(153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical IF Macro (A14)")); choices.insert(p_t(153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical IF Macro")); @@ -540,11 +559,15 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(156, "Tamron SP 70-300mm f/4-5.6 Di VC USD")); choices.insert(p_t(160, "Canon EF 20-35mm f/3.5-4.5 USM")); choices.insert(p_t(160, "Tamron AF 19-35mm f/3.5-4.5")); + choices.insert(p_t(160, "Tokina AT-X 124 AF Pro DX 12-24mm f/4")); + choices.insert(p_t(160, "Tokina AT-X 107 AF DX 10-17mm f/3.5-4.5 Fisheye")); + choices.insert(p_t(160, "Tokina AT-X 116 AF Pro DX 11-16mm f/2.8")); choices.insert(p_t(161, "Canon EF 28-70mm f/2.8L")); choices.insert(p_t(161, "Sigma 24-70mm f/2.8 EX")); choices.insert(p_t(161, "Sigma 28-70mm f/2.8 EX")); choices.insert(p_t(161, "Tamron AF 17-50mm f/2.8 Di-II LD Aspherical")); choices.insert(p_t(161, "Tamron 90mm f/2.8")); + choices.insert(p_t(161, "Sigma 24-60mm f/2.8 EX DG")); choices.insert(p_t(162, "Canon EF 200mm f/2.8L")); choices.insert(p_t(163, "Canon EF 300mm f/4L")); choices.insert(p_t(164, "Canon EF 400mm f/5.6L")); @@ -559,6 +582,7 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(169, "Sigma 30mm f/1.4 EX DC HSM")); choices.insert(p_t(169, "Sigma 50mm f/1.4 EX DG HSM")); choices.insert(p_t(169, "Sigma 85mm f/1.4 EX DG HSM")); + choices.insert(p_t(169, "Sigma 35mm f/1.4 DG HSM")); choices.insert(p_t(170, "Canon EF 200mm f/2.8L II")); choices.insert(p_t(171, "Canon EF 300mm f/4L")); choices.insert(p_t(172, "Canon EF 400mm f/5.6L")); @@ -566,16 +590,19 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(173, "Sigma 180mm f/3.5 EX HSM Macro")); choices.insert(p_t(173, "Sigma APO 150mm f/2.8 EX DG HSM Macro")); choices.insert(p_t(174, "Canon EF 135mm f/2L")); - choices.insert(p_t(174, "Sigma APO 70-200mm f/2.8 EX DG OS HSM")); + choices.insert(p_t(174, "Sigma 70-200mm f/2.8 EX DG APO OS HSM")); + choices.insert(p_t(174, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM")); choices.insert(p_t(175, "Canon EF 400mm f/2.8L")); choices.insert(p_t(176, "Canon EF 24-85mm f/3.5-4.5 USM")); choices.insert(p_t(177, "Canon EF 300mm f/4L IS")); choices.insert(p_t(178, "Canon EF 28-135mm f/3.5-5.6 IS")); - choices.insert(p_t(179, "Canon EF 24mm f/1.4L USM")); + choices.insert(p_t(179, "Canon EF 24mm f/1.4L")); choices.insert(p_t(180, "Canon EF 35mm f/1.4L")); choices.insert(p_t(181, "Canon EF 100-400mm f/4.5-5.6L IS + x1.4")); choices.insert(p_t(182, "Canon EF 100-400mm f/4.5-5.6L IS + x2")); choices.insert(p_t(183, "Canon EF 100-400mm f/4.5-5.6L IS")); + choices.insert(p_t(183, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro")); + choices.insert(p_t(183, "Sigma 105mm f/2.8 EX DG OS HSM Macro")); choices.insert(p_t(184, "Canon EF 400mm f/2.8L + x2")); choices.insert(p_t(185, "Canon EF 600mm f/4L IS")); choices.insert(p_t(186, "Canon EF 70-200mm f/4L")); @@ -588,7 +615,7 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(194, "Canon EF 80-200mm f/4.5-5.6 USM")); choices.insert(p_t(195, "Canon EF 35-105mm f/4.5-5.6 USM")); choices.insert(p_t(196, "Canon EF 75-300mm f/4-5.6 USM")); - choices.insert(p_t(197, "Canon EF 75-300mm f/4-5.6 IS")); + choices.insert(p_t(197, "Canon EF 75-300mm f/4-5.6 IS USM")); choices.insert(p_t(198, "Canon EF 50mm f/1.4 USM")); choices.insert(p_t(199, "Canon EF 28-80mm f/3.5-5.6 USM")); choices.insert(p_t(200, "Canon EF 75-300mm f/4-5.6 USM")); @@ -597,15 +624,15 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(208, "Canon EF 22-55mm f/4-5.6 USM")); choices.insert(p_t(209, "Canon EF 55-200mm f/4.5-5.6")); choices.insert(p_t(210, "Canon EF 28-90mm f/4-5.6 USM")); - choices.insert(p_t(211, "Canon EF 28-200mm f/3.5-5.6")); + choices.insert(p_t(211, "Canon EF 28-200mm f/3.5-5.6 USM")); choices.insert(p_t(212, "Canon EF 28-105mm f/4-5.6 USM")); - choices.insert(p_t(213, "Canon EF 90-300mm f/4.5-5.6")); - choices.insert(p_t(214, "Canon EF-S 18-55mm f/3.5-4.5 USM")); + choices.insert(p_t(213, "Canon EF 90-300mm f/4.5-5.6 USM")); + choices.insert(p_t(214, "Canon EF-S 18-55mm f/3.5-5.6 USM")); choices.insert(p_t(215, "Canon EF 55-200mm f/4.5-5.6 II USM")); - choices.insert(p_t(224, "Canon EF 70-200mm f/2.8L IS USM")); - choices.insert(p_t(225, "Canon EF 70-200mm f/2.8L IS USM + x1.4")); - choices.insert(p_t(226, "Canon EF 70-200mm f/2.8L IS USM + x2")); - choices.insert(p_t(227, "Canon EF 70-200mm f/2.8L IS + 2.8x")); + choices.insert(p_t(224, "Canon EF 70-200mm f/2.8L IS")); + choices.insert(p_t(225, "Canon EF 70-200mm f/2.8L IS + x1.4")); + choices.insert(p_t(226, "Canon EF 70-200mm f/2.8L IS + x2")); + choices.insert(p_t(227, "Canon EF 70-200mm f/2.8L IS + x2.8")); choices.insert(p_t(228, "Canon EF 28-105mm f/3.5-4.5 USM")); choices.insert(p_t(229, "Canon EF 16-35mm f/2.8L")); choices.insert(p_t(230, "Canon EF 24-70mm f/2.8L")); @@ -617,10 +644,10 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(236, "Canon EF-S 60mm f/2.8 Macro USM")); choices.insert(p_t(237, "Canon EF 24-105mm f/4L IS")); choices.insert(p_t(238, "Canon EF 70-300mm f/4-5.6 IS USM")); - choices.insert(p_t(239, "Canon EF 85mm f/1.2L II USM")); + choices.insert(p_t(239, "Canon EF 85mm f/1.2L II")); choices.insert(p_t(240, "Canon EF-S 17-55mm f/2.8 IS USM")); - choices.insert(p_t(241, "Canon EF 50mm f/1.2L USM")); - choices.insert(p_t(242, "Canon EF 70-200mm f/4L IS USM")); + choices.insert(p_t(241, "Canon EF 50mm f/1.2L")); + choices.insert(p_t(242, "Canon EF 70-200mm f/4L IS")); choices.insert(p_t(243, "Canon EF 70-200mm f/4L IS + 1.4x")); choices.insert(p_t(244, "Canon EF 70-200mm f/4L IS + 2x")); choices.insert(p_t(245, "Canon EF 70-200mm f/4L IS + 2.8x")); @@ -630,8 +657,28 @@ class CALensInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(249, "Canon EF 800mm f/5.6L IS")); choices.insert(p_t(250, "Canon EF 24mm f/1.4L II")); choices.insert(p_t(251, "Canon EF 70-200mm f/2.8L IS II USM")); + choices.insert(p_t(252, "Canon EF 70-200mm f/2.8L IS II USM + x1.4")); + choices.insert(p_t(253, "Canon EF 70-200mm f/2.8L IS II USM + x2")); choices.insert(p_t(254, "Canon EF 100mm f/2.8L Macro IS USM")); choices.insert(p_t(488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM")); + choices.insert(p_t(489, "Canon EF 70-300mm f/4-5.6L IS USM")); + choices.insert(p_t(490, "Canon EF 8-15mm f/4L USM")); + choices.insert(p_t(491, "Canon EF 300mm f/2.8L IS II USM")); + choices.insert(p_t(492, "Canon EF 400mm f/2.8L IS II USM")); + choices.insert(p_t(493, "Canon EF 24-105mm f/4L IS USM")); + choices.insert(p_t(494, "Canon EF 600mm f/4.0L IS II USM")); + choices.insert(p_t(495, "Canon EF 24-70mm f/2.8L II USM")); + choices.insert(p_t(496, "Canon EF 200-400mm f/4L IS USM")); + choices.insert(p_t(502, "Canon EF 28mm f/2.8 IS USM")); + choices.insert(p_t(503, "Canon EF 24mm f/2.8 IS USM")); + choices.insert(p_t(504, "Canon EF 24-70mm f/4L IS USM")); + choices.insert(p_t(505, "Canon EF 35mm f/2 IS USM")); + choices.insert(p_t(4142, "Canon EF-S 18-135mm f/3.5-5.6 IS STM")); + choices.insert(p_t(4143, "Canon EF-M 18-55mm f/3.5-5.6 IS STM")); + choices.insert(p_t(4144, "Canon EF 40mm f/2.8 STM")); + choices.insert(p_t(4145, "Canon EF-M 22mm f/2 STM")); + choices.insert(p_t(4146, "Canon EF-S 18-55mm f/3.5-5.6 IS STM")); + choices.insert(p_t(4147, "Canon EF-M 11-22mm f/4-5.6 IS STM")); } virtual std::string toString (Tag* t) @@ -1256,205 +1303,205 @@ public: CAAspectRatioInterpreter caAspectRatioInterpreter; const TagAttrib canonCameraSettingsAttribs[] = { - {0, 1, 0, 0, 1, "MacroMode", &caMacroModeInterpreter}, - {0, 1, 0, 0, 2, "SelfTimer", &caSelfTimerInterpreter}, - {0, 1, 0, 0, 3, "Quality", &caQualityInterpreter}, - {0, 1, 0, 0, 4, "CanonFlashMode", &caFlashModeInterpreter}, - {0, 1, 0, 0, 5, "ContinuousDrive", &caContinuousDriveInterpreter}, - {0, 1, 0, 0, 7, "FocusMode", &caFocusModeInterpreter}, - {0, 1, 0, 0, 9, "RecordMode", &caRecordModeInterpreter}, - {0, 1, 0, 0, 10, "CanonImageSize", &caImageSizeInterpreter}, - {0, 1, 0, 0, 11, "EasyMode", &caEasyModeInterpreter}, - {0, 1, 0, 0, 12, "DigitalZoom", &caDigitalZoomInterpreter}, - {0, 1, 0, 0, 13, "Contrast", &stdInterpreter}, - {0, 1, 0, 0, 14, "Saturation", &stdInterpreter}, - {0, 1, 0, 0, 15, "Sharpness", &stdInterpreter}, - {0, 1, 0, 0, 16, "CameraISO", &stdInterpreter}, - {0, 1, 0, 0, 17, "MeteringMode", &caMeteringModeInterpreter}, - {0, 1, 0, 0, 18, "FocusRange", &caFocusRangeInterpreter}, - {0, 1, 0, 0, 19, "AFPoint", &caAFPointInterpreter}, - {0, 1, 0, 0, 20, "CanonExposureMode", &caExposureModeInterpreter}, - {0, 1, 0, 0, 22, "LensID", &caLensInterpreter}, - {0, 1, 0, 0, 23, "LongFocal", &caFocalInterpreter}, - {0, 1, 0, 0, 24, "ShortFocal", &caFocalInterpreter}, - {0, 1, 0, 0, 25, "FocalUnits", &stdInterpreter}, - {0, 1, 0, 0, 26, "MaxAperture", &caApertureInterpreter}, - {0, 1, 0, 0, 27, "MinAperture", &caApertureInterpreter}, - {0, 1, 0, 0, 28, "FlashActivity", &stdInterpreter}, - {0, 1, 0, 0, 29, "FlashBits", &caFlashBitsInterpreter}, - {0, 1, 0, 0, 32, "FocusContinuous", &caFocusContinuousInterpreter}, - {0, 1, 0, 0, 33, "AESetting", &caAESettingsInterpreter}, - {0, 1, 0, 0, 34, "ImageStabilization", &caStabilizationInterpreter}, - {0, 1, 0, 0, 35, "DisplayAperture", &stdInterpreter}, - {0, 1, 0, 0, 36, "ZoomSourceWidth", &stdInterpreter}, - {0, 1, 0, 0, 37, "ZoomTargetWidth", &stdInterpreter}, - {0, 1, 0, 0, 39, "SpotMeteringMode", &caSpotMeteringInterpreter}, - {0, 1, 0, 0, 40, "PhotoEffect", &caPhotoEffectInterpreter}, - {0, 1, 0, 0, 41, "ManualFlashOutput", &caManualFlashInterpreter}, - {0, 1, 0, 0, 42, "ColorTone", &stdInterpreter}, - {0, 1, 0, 0, 46, "SRAWQuality", &caRAWQualityInterpreter}, - {-1, 0, 0, 0, 0, "", NULL} + {0, AC_WRITE, 0, 0, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "Quality", &caQualityInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, + {0, AC_WRITE, 0, 0, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, + {0, AC_WRITE, 0, 0, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, + {0, AC_WRITE, 0, 0, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, + {0, AC_WRITE, 0, 0, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, + {0, AC_WRITE, 0, 0, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, + {0, AC_WRITE, 0, 0, 13, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 14, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 15, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 16, AUTO, "CameraISO", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, + {0, AC_WRITE, 0, 0, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, + {0, AC_WRITE, 0, 0, 19, AUTO, "AFPoint", &caAFPointInterpreter}, + {0, AC_WRITE, 0, 0, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, + {0, AC_WRITE, 0, 0, 22, AUTO, "LensID", &caLensInterpreter}, + {0, AC_WRITE, 0, 0, 23, AUTO, "LongFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, 0, 24, AUTO, "ShortFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, 0, 25, AUTO, "FocalUnits", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 26, AUTO, "MaxAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, 0, 27, AUTO, "MinAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, 0, 28, AUTO, "FlashActivity", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, + {0, AC_WRITE, 0, 0, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, + {0, AC_WRITE, 0, 0, 33, AUTO, "AESetting", &caAESettingsInterpreter}, + {0, AC_WRITE, 0, 0, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, + {0, AC_WRITE, 0, 0, 35, AUTO, "DisplayAperture", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, + {0, AC_WRITE, 0, 0, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, + {0, AC_WRITE, 0, 0, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, + {0, AC_WRITE, 0, 0, 42, AUTO, "ColorTone", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} }; const TagAttrib canonFocalLengthAttribs[] = { - {0, 1, 0, 0, 0, "FocalType", &caFocalTypeInterpreter}, - {0, 1, 0, 0, 1, "FocalLength", &caFocalInterpreter}, - {0, 1, 0, 0, 2, "FocalPlaneXSize", &caFocalPlaneInterpreter}, - {0, 1, 0, 0, 3, "FocalPlaneYSize", &caFocalPlaneInterpreter}, - {-1, 0, 0, 0, 0, "", NULL} + {0, AC_WRITE, 0, 0, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "FocalLength", &caFocalInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} }; const TagAttrib canonShotInfoAttribs[] = { - {0, 1, 0, 0, 1, "AutoISO", &stdInterpreter}, - {0, 1, 0, 0, 2, "BaseISO" ,&caBaseISOInterpreter}, - {0, 1, 0, 0, 3, "MeasuredEV", &stdInterpreter}, - {0, 1, 0, 0, 4, "TargetAperture", &caApertureInterpreter}, - {0, 1, 0, 0, 5, "TargetExposureTime",&caExposureTimeInterpreter}, - {0, 1, 0, 0, 6, "ExposureCompensation",&caEVInterpreter}, - {0, 1, 0, 0, 7, "WhiteBalance",&caWhiteBalanceInterpreter}, - {0, 1, 0, 0, 8, "SlowShutter",&caSlowShutterInterpreter}, - {0, 1, 0, 0, 9, "SequenceNumber", &stdInterpreter}, - {0, 1, 0, 0,10, "OpticalZoomCode", &stdInterpreter}, - {0, 1, 0, 0,13, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, - {0, 1, 0, 0,14, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, - {0, 1, 0, 0,15, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0,16, "AutoExposureBracketing",&caAutoExposureBracketingInterpreter}, - {0, 1, 0, 0,17, "AEBBracketValue", &stdInterpreter}, - {0, 1, 0, 0,18, "ControlMode", &caControModeInterpreter}, - {0, 1, 0, 0,19, "FocusDistanceUpper", &caFocusDistanceInterpreter}, - {0, 1, 0, 0,20, "FocusDistanceLower", &caFocusDistanceInterpreter}, - {0, 1, 0, 0,21, "FNumber" ,&caApertureInterpreter}, - {0, 1, 0, 0,22, "ExposureTime",&caExposureTimeInterpreter}, - {0, 1, 0, 0,24, "BulbDuration", &stdInterpreter}, - {0, 1, 0, 0,24, "MeasuredEV2", &caMeasuredEVInterpreter}, - {0, 1, 0, 0,26, "CameraType", &caCameraTypeInterpreter}, - {0, 1, 0, 0,27, "AutoRotate",&caAutoRotateInterpreter}, - {0, 1, 0, 0,28, "NDFilter",&caOnOffInterpreter}, - {0, 1, 0, 0,29, "Self-timer2", &stdInterpreter}, - {0, 1, 0, 0,33, "FlashOutput", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}, + {0, AC_WRITE, 0, 0, 1, AUTO, "AutoISO", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "BaseISO" ,&caBaseISOInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "MeasuredEV", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "TargetAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "TargetExposureTime",&caExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 6, AUTO, "ExposureCompensation",&caEVInterpreter}, + {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalance",&caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, 0, 8, AUTO, "SlowShutter",&caSlowShutterInterpreter}, + {0, AC_WRITE, 0, 0, 9, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0,10, AUTO, "OpticalZoomCode", &stdInterpreter}, + {0, AC_WRITE, 0, 0,13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, + {0, AC_WRITE, 0, 0,14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, + {0, AC_WRITE, 0, 0,15, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0,16, AUTO, "AutoExposureBracketing",&caAutoExposureBracketingInterpreter}, + {0, AC_WRITE, 0, 0,17, AUTO, "AEBBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0,18, AUTO, "ControlMode", &caControModeInterpreter}, + {0, AC_WRITE, 0, 0,19, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, 0,20, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, 0,21, AUTO, "FNumber" ,&caApertureInterpreter}, + {0, AC_WRITE, 0, 0,22, AUTO, "ExposureTime",&caExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0,24, AUTO, "BulbDuration", &stdInterpreter}, + {0, AC_WRITE, 0, 0,24, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, + {0, AC_WRITE, 0, 0,26, AUTO, "CameraType", &caCameraTypeInterpreter}, + {0, AC_WRITE, 0, 0,27, AUTO, "AutoRotate",&caAutoRotateInterpreter}, + {0, AC_WRITE, 0, 0,28, AUTO, "NDFilter",&caOnOffInterpreter}, + {0, AC_WRITE, 0, 0,29, AUTO, "Self-timer2", &stdInterpreter}, + {0, AC_WRITE, 0, 0,33, AUTO, "FlashOutput", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, }; const TagAttrib canonFileInfoAttribs[] = { - {0, 1, 0, 0, 1, "FileNumber", &caFileNumberInterpreter}, - {0, 1, 0, 0, 3, "BracketMode", &caBracketModeInterpreter}, - {0, 1, 0, 0, 4, "BracketValue", &stdInterpreter}, - {0, 1, 0, 0, 5, "BracketShotNumber", &stdInterpreter}, - {0, 1, 0, 0, 6, "RawJpgQuality",&caRAWJpegQualityInterpreter}, - {0, 1, 0, 0, 7, "RawJpgSize",&caJpegSizeInterpreter}, - {0, 1, 0, 0, 8, "NoiseReduction",&stdInterpreter}, - {0, 1, 0, 0, 9, "WBBracketMode" ,&caWBBracketModeInterpreter}, - {0, 1, 0, 0,12, "WBBracketValueAB", &stdInterpreter}, - {0, 1, 0, 0,13, "WBBracketValueGM", &stdInterpreter}, - {0, 1, 0, 0,14, "FilterEffect" ,&caFilterEffectInterpreter}, - {0, 1, 0, 0,15, "ToningEffect" ,&caToningEffectInterpreter}, - {0, 1, 0, 0,19, "LiveViewShooting" ,&caOnOffInterpreter}, - {0, 1, 0, 0,25, "FlashExposureLock" ,&caOnOffInterpreter}, - {-1,0, 0, 0, 0, "", NULL}, + {0, AC_WRITE, 0, 0, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "BracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 6, AUTO, "RawJpgQuality",&caRAWJpegQualityInterpreter}, + {0, AC_WRITE, 0, 0, 7, AUTO, "RawJpgSize",&caJpegSizeInterpreter}, + {0, AC_WRITE, 0, 0, 8, AUTO, "NoiseReduction",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 9, AUTO, "WBBracketMode" ,&caWBBracketModeInterpreter}, + {0, AC_WRITE, 0, 0,12, AUTO, "WBBracketValueAB", &stdInterpreter}, + {0, AC_WRITE, 0, 0,13, AUTO, "WBBracketValueGM", &stdInterpreter}, + {0, AC_WRITE, 0, 0,14, AUTO, "FilterEffect" ,&caFilterEffectInterpreter}, + {0, AC_WRITE, 0, 0,15, AUTO, "ToningEffect" ,&caToningEffectInterpreter}, + {0, AC_WRITE, 0, 0,19, AUTO, "LiveViewShooting" ,&caOnOffInterpreter}, + {0, AC_WRITE, 0, 0,25, AUTO, "FlashExposureLock" ,&caOnOffInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, }; const TagAttrib canonProcessingInfoAttribs[] = { - {0, 1, 0, 0, 1,"ToneCurve", &caToneCurveInterpreter}, - {0, 1, 0, 0, 2,"Sharpness", &stdInterpreter}, - {0, 1, 0, 0, 3,"SharpnessFrequency", &caSharpnessFrequencyInterpreter}, - {0, 1, 0, 0, 4,"SensorRedLevel", &stdInterpreter}, - {0, 1, 0, 0, 5,"SensorBlueLevel", &stdInterpreter}, - {0, 1, 0, 0, 6,"WhiteBalanceRed", &stdInterpreter}, - {0, 1, 0, 0, 7,"WhiteBalanceBlue", &stdInterpreter}, - {0, 1, 0, 0, 8,"WhiteBalance", &caWhiteBalanceInterpreter}, - {0, 1, 0, 0, 9,"ColorTemperature", &stdInterpreter}, - {0, 1, 0, 0,10,"PictureStyle", &caPictureStyleInterpreter}, - {0, 1, 0, 0,11,"DigitalGain", &stdInterpreter}, - {0, 1, 0, 0,12,"WBShiftAB", &stdInterpreter}, - {0, 1, 0, 0,13,"WBShiftGM", &stdInterpreter}, - {-1,0, 0, 0, 0, "", NULL}, + {0, AC_WRITE, 0, 0, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "SensorRedLevel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, 0, 9, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0,10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, + {0, AC_WRITE, 0, 0,11, AUTO, "DigitalGain", &stdInterpreter}, + {0, AC_WRITE, 0, 0,12, AUTO, "WBShiftAB", &stdInterpreter}, + {0, AC_WRITE, 0, 0,13, AUTO, "WBShiftGM", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, }; const TagAttrib canonPanoramaInfoAttribs[] = { - {0, 1, 0, 0, 2,"PanoramaFrameNumber", &stdInterpreter}, - {0, 1, 0, 0, 5,"PanoramaDirection", &caPanoramaDirectionInterpreter}, - {-1,0, 0, 0, 0, "", NULL}, + {0, AC_WRITE, 0, 0, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, }; const TagAttrib canonCropInfoAttribs[] = { - {0, 1, 0, 0, 0,"CropLeftMargin", &stdInterpreter}, - {0, 1, 0, 0, 1,"CropRightMargin", &stdInterpreter}, - {0, 1, 0, 0, 2,"CropTopMargin", &stdInterpreter}, - {0, 1, 0, 0, 3,"CropBottomMargin", &stdInterpreter}, - {-1,0, 0, 0, 0, "", NULL}, + {0, AC_WRITE, 0, 0, 0, AUTO, "CropLeftMargin", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "CropRightMargin", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "CropTopMargin", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "CropBottomMargin", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, }; const TagAttrib canonAspectInfoAttribs[] = { - {0, 1, 0, 0, 0,"AspectRatio", &caAspectRatioInterpreter}, - {0, 1, 0, 0, 1,"CroppedImageWidth", &stdInterpreter}, - {0, 1, 0, 0, 2,"CroppedImageHeight", &stdInterpreter}, - {-1,0, 0, 0, 0, "", NULL}, + {0, AC_WRITE, 0, 0, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, }; const TagAttrib canonMicroAdjustAttrib[] = { - {0, 1, 0, 0, 1,"AFMicroAdjActive", &caOnOffInterpreter}, - {-1,0, 0, 0, 2,"AFMicroAdjValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 2, AUTO, "", NULL}, }; const TagAttrib canonAttribs[] = { - {0, 1, 0, canonCameraSettingsAttribs, 0x0001, "CanonCameraSettings", &stdInterpreter}, - {0, 1, 0, canonFocalLengthAttribs, 0x0002, "CanonFocalLength", &stdInterpreter}, - {0, 1, 0, 0, 0x0003, "CanonFlashInfo", &stdInterpreter}, - {0, 1, 0, canonShotInfoAttribs, 0x0004, "CanonShotInfo", &stdInterpreter}, - {0, 1, 0, canonPanoramaInfoAttribs, 0x0005, "CanonPanorama", &stdInterpreter}, - {0, 1, 0, 0, 0x0006, "CanonImageType", &stdInterpreter}, - {0, 1, 0, 0, 0x0007, "CanonFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0008, "FileNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x0009, "OwnerName", &stdInterpreter}, - {0, 1, 0, 0, 0x000a, "ColorInfoD30", &stdInterpreter}, - {0, 1, 0, 0, 0x000c, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x000d, "CanonCameraInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x000e, "CanonFileLength", &stdInterpreter}, - {0, 1, 0, 0, 0x000f, "CustomFunctions", &stdInterpreter}, - {0, 1, 0, 0, 0x0010, "CanonModelID", &caModelIDInterpreter}, - {0, 1, 0, 0, 0x0012, "CanonAFInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0015, "SerialNumberFormat", &stdInterpreter}, - {0, 1, 0, 0, 0x001c, "DateStampMode", &stdInterpreter}, - {0, 1, 0, 0, 0x001d, "MyColors", &stdInterpreter}, - {0, 1, 0, 0, 0x001e, "FirmwareRevision", &stdInterpreter}, - {0, 3, 0, 0, 0x0024, "FaceDetect1", &stdInterpreter}, - {0, 3, 0, 0, 0x0025, "FaceDetect2", &stdInterpreter}, - {0, 1, 0, 0, 0x0026, "CanonAFInfo2", &stdInterpreter}, - {0, 1, 0, 0, 0x0083, "OriginalDecisionData", &stdInterpreter}, - {0, 1, 0, 0, 0x0090, "CustomFunctions1D", &stdInterpreter}, - {0, 1, 0, 0, 0x0091, "PersonalFunctions", &stdInterpreter}, - {0, 1, 0, 0, 0x0092, "PersonalFunctionValues", &stdInterpreter}, - {0, 1, 0, canonFileInfoAttribs, 0x0093, "CanonFileInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0094, "AFPointsInFocus1D", &stdInterpreter}, - {0, 1, 0, 0, 0x0095, "LensType", &stdInterpreter}, - {0, 1, 0, 0, 0x0096, "InternalSerialNumber", &caIntSerNumInterpreter}, - {0, 1, 0, 0, 0x0097, "DustRemovalData", &stdInterpreter}, - {0, 1, 0, canonCropInfoAttribs, 0x0098, "CropInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0099, "CustomFunctions2", &stdInterpreter}, - {0, 1, 0, canonAspectInfoAttribs, 0x009a, "AspectInfo", &stdInterpreter}, - {0, 1, 0, canonProcessingInfoAttribs, 0x00a0, "ProcessingInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x00a1, "ToneCurveTable", &stdInterpreter}, - {0, 1, 0, 0, 0x00a2, "SharpnessTable", &stdInterpreter}, - {0, 1, 0, 0, 0x00a3, "SharpnessFreqTable", &stdInterpreter}, - {0, 1, 0, 0, 0x00a4, "WhiteBalanceTable", &stdInterpreter}, - {0, 1, 0, 0, 0x00a9, "ColorBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x00aa, "MeasuredColor", &stdInterpreter}, - {0, 1, 0, 0, 0x00ae, "ColorTemperature", &stdInterpreter}, - {0, 3, 0, 0, 0x00b0, "CanonFlags", &stdInterpreter}, - {0, 1, 0, 0, 0x00b1, "ModifiedInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x00b2, "ToneCurveMatching", &stdInterpreter}, - {0, 1, 0, 0, 0x00b3, "WhiteBalanceMatching", &stdInterpreter}, - {0, 1, 0, 0, 0x00b4, "ColorSpace", &stdInterpreter}, - {1, 1, 0, 0, 0x00b6, "PreviewImageInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x00d0, "VRDOffset", &stdInterpreter}, - {0, 1, 0, 0, 0x00e0, "SensorInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x4001, "ColorBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x4002, "UnknownBlock1", &stdInterpreter}, - {0, 1, 0, 0, 0x4003, "ColorInfo", &stdInterpreter}, - {1, 1, 0, 0, 0x4005, "UnknownBlock2", &stdInterpreter}, - {1, 1, 0, 0, 0x4008, "BlackLevel", &stdInterpreter}, - {1, 1, 0, canonMicroAdjustAttrib, 0x4013, "AFMicroAdj", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, canonCameraSettingsAttribs, 0x0001, AUTO, "CanonCameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, canonFocalLengthAttribs, 0x0002, AUTO, "CanonFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, + {0, AC_WRITE, 0, canonShotInfoAttribs, 0x0004, AUTO, "CanonShotInfo", &stdInterpreter}, + {0, AC_WRITE, 0, canonPanoramaInfoAttribs, 0x0005, AUTO, "CanonPanorama", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FileNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0009, AUTO, "OwnerName", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, + {0, AC_WRITE, 0, 0, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001d, AUTO, "MyColors", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, + {0, AC_NEW, 0, 0, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, + {0, AC_NEW, 0, 0, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, + {0, AC_WRITE, 0, canonFileInfoAttribs, 0x0093, AUTO, "CanonFileInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0095, AUTO, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, + {0, AC_WRITE, 0, 0, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, + {0, AC_WRITE, 0, canonCropInfoAttribs, 0x0098, AUTO, "CropInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, + {0, AC_WRITE, 0, canonAspectInfoAttribs, 0x009a, AUTO, "AspectInfo", &stdInterpreter}, + {0, AC_WRITE, 0, canonProcessingInfoAttribs, 0x00a0, AUTO, "ProcessingInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_NEW , 0, 0, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, + {1, AC_WRITE, 0, canonMicroAdjustAttrib, 0x4013, AUTO, "AFMicroAdj", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; } #endif diff --git a/rtexif/fujiattribs.cc b/rtexif/fujiattribs.cc index 93d2170f6..717c5018e 100644 --- a/rtexif/fujiattribs.cc +++ b/rtexif/fujiattribs.cc @@ -217,44 +217,44 @@ FAPictureModeInterpreter faPictureModeInterpreter; const TagAttrib fujiAttribs[] = { - {0, 1, 0, 0, 0x0000, "Version", &stdInterpreter}, - {0, 1, 0, 0, 0x0010, "InternalSerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x1000, "Quality", &stdInterpreter}, - {0, 1, 0, 0, 0x1001, "Sharpness", &faSharpnessInterpreter}, - {0, 1, 0, 0, 0x1002, "WhiteBalance", &faWhiteBalanceInterpreter}, - {0, 1, 0, 0, 0x1003, "Saturation", &faSaturationInterpreter}, - {0, 1, 0, 0, 0x1004, "Contrast", &faContrastInterpreter}, - {0, 1, 0, 0, 0x1005, "ColorTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x1006, "Contrast2", &faContrast2Interpreter}, - {0, 1, 0, 0, 0x100a, "WhiteBalanceFineTune", &stdInterpreter}, - {0, 1, 0, 0, 0x100b, "NoiseReduction", &faNoiseReductionInterpreter}, - {0, 1, 0, 0, 0x1010, "FujiFlashMode", &faFlashInterpreter}, - {0, 1, 0, 0, 0x1011, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0, 0x1020, "Macro", &faOnOffInterpreter}, - {0, 1, 0, 0, 0x1021, "FocusMode", &faFocusModeInterpreter}, - {0, 1, 0, 0, 0x1023, "FocusPixel", &stdInterpreter}, - {0, 1, 0, 0, 0x1030, "SlowSync", &faOnOffInterpreter}, - {0, 1, 0, 0, 0x1031, "PictureMode", &faPictureModeInterpreter}, - {0, 1, 0, 0, 0x1100, "AutoBracketing", &faOnOffInterpreter}, - {0, 1, 0, 0, 0x1101, "SequenceNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x1210, "ColorMode", &faColorModeInterpreter}, - {0, 1, 0, 0, 0x1300, "BlurWarning", &faOnOffInterpreter}, - {0, 1, 0, 0, 0x1301, "FocusWarning", &faOnOffInterpreter}, - {0, 1, 0, 0, 0x1302, "ExposureWarning", &faOnOffInterpreter}, - {0, 1, 0, 0, 0x1400, "DynamicRange", &faDynamicRangeInterpreter}, - {0, 1, 0, 0, 0x1401, "FilmMode", &faFilmModeInterpreter}, - {0, 1, 0, 0, 0x1402, "DynamicRangeSetting", &faDRSettingInterpreter}, - {0, 1, 0, 0, 0x1403, "DevelopmentDynamicRange", &stdInterpreter}, - {0, 1, 0, 0, 0x1404, "MinFocalLength", &stdInterpreter}, - {0, 1, 0, 0, 0x1405, "MaxFocalLength", &stdInterpreter}, - {0, 1, 0, 0, 0x1406, "MaxApertureAtMinFocal", &stdInterpreter}, - {0, 1, 0, 0, 0x1407, "MaxApertureAtMaxFocal", &stdInterpreter}, - {0, 1, 0, 0, 0x140b, "AutoDynamicRange", &stdInterpreter}, - {0, 1, 0, 0, 0x4100, "FacesDetected", &stdInterpreter}, - {0, 1, 0, 0, 0x8000, "FileSource", &stdInterpreter}, - {0, 1, 0, 0, 0x8002, "OrderNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x8003, "FrameNumber", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "Version", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1000, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, + {0, AC_WRITE, 0, 0, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, 0, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, + {0, AC_WRITE, 0, 0, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, + {0, AC_WRITE, 0, 0, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, + {0, AC_WRITE, 0, 0, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, + {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, + {0, AC_WRITE, 0, 0, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, + {0, AC_WRITE, 0, 0, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, + {0, AC_WRITE, 0, 0, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x8000, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; } #endif diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index bd1f0e176..79dc3a462 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -34,13 +34,69 @@ class NAISOInterpreter : public Interpreter { public: NAISOInterpreter () {} virtual std::string toString (Tag* t) { - char buffer[32]; + char buffer[32]; sprintf (buffer, "%d", t->toInt(2)); return buffer; } }; NAISOInterpreter naISOInterpreter; +class NAISOInfoISOInterpreter : public Interpreter { + public: + NAISOInfoISOInterpreter () {} + virtual std::string toString (Tag* t) { + char buffer[32]; + int a = t->toInt(); + sprintf (buffer, "%d", a); + return buffer; + } + virtual double toDouble (Tag* t, int ofs){ + int a = t->getValue()[ofs]; + if(a>1) { + double i = pow(2., double(a)/12. - 5.) * 100.; + return i; + } + else + return 0.; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + int a = t->getValue()[ofs]; + if(a>1) { + int i = int(double(powf(2.f, float(a)/12.f - 5.f)) * 100.f +0.5f); + return i; + } + else + return 0; + } +}; +NAISOInfoISOInterpreter naISOInfoISOInterpreter; + +class NAISOExpansionInterpreter : public Interpreter { + public: + NAISOExpansionInterpreter () {} + virtual std::string toString (Tag* t) { + int a = t->toInt(); + // unclear if this interpretation is correct! + switch (a) { + case 0x0: return "Off"; + case 0x101: return "Hi 0.3"; + case 0x102: return "Hi 0.5"; + case 0x103: return "Hi 0.7"; + case 0x104: return "Hi 1.0"; + case 0x105: return "Hi 1.3"; + case 0x106: return "Hi 1.5"; + case 0x107: return "Hi 1.7"; + case 0x108: return "Hi 2.0"; + case 0x201: return "Lo 0.3"; + case 0x202: return "Lo 0.5"; + case 0x203: return "Lo 0.7"; + case 0x204: return "Lo 1.0"; + default: { char buffer[32]; sprintf(buffer, "0x%04X", a); return buffer; } + } + } +}; +NAISOExpansionInterpreter naISOExpansionInterpreter; + class NALensTypeInterpreter : public Interpreter { public: NALensTypeInterpreter () {} @@ -174,19 +230,21 @@ NAAFInfoInterpreter naAFInfoInterpreter; class NALensDataInterpreter : public Interpreter { std::map lenses; public: - NALensDataInterpreter () { + NALensDataInterpreter () { // From EXIFTOOL database 'Nikon.pm' V2.80 /* The key is a composite string made of 8 HEX bytes * LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType */ - lenses["00 00 00 00 00 00 00 01"] = "Manual Lens No CPU "; - lenses["00 00 00 00 00 00 E1 12"] = "TC-17E II "; + lenses["00 00 00 00 00 00 00 01"] = "Manual Lens No CPU"; + lenses["00 00 00 00 00 00 E1 12"] = "TC-17E II"; lenses["00 00 00 00 00 00 F1 0C"] = "TC-14E [II] or Sigma APO Tele Converter 1.4x EX DG or Kenko Teleplus PRO 300 DG 1.4x"; lenses["00 00 00 00 00 00 F2 18"] = "TC-20E [II] or Sigma APO Tele Converter 2x EX DG or Kenko Teleplus PRO 300 DG 2.0x"; - lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF11-18mm f/4.5-5.6 Di II LD Aspherical (IF)"; + lenses["00 00 48 48 53 53 00 01"] = "Loreo 40mm f/11-22 3D Lens in a Cap 9005"; + lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF)"; lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 PRO DX AF 12-24mm f/4"; lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF)"; lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)"; lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro"; lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di"; + lenses["00 40 11 11 2C 2C 00 00"] = "Samyang 8mm f/3.5 Fish-Eye"; lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 DX Fish-Eye AF 10-17mm f/3.5-4.5"; lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX AF 16.5-135mm f/3.5-5.6"; lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 PRO AF 17mm f/3.5"; @@ -201,7 +259,7 @@ class NALensDataInterpreter : public Interpreter { lenses["00 47 10 10 24 24 00 00"] = "Fisheye Nikkor 8mm f/2.8 AiS"; lenses["00 47 25 25 24 24 00 02"] = "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)"; lenses["00 47 44 44 24 24 00 06"] = "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)"; - lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF55-200mm f/4-5.6 Di II LD"; + lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF 55-200mm f/4-5.6 Di II LD"; lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX AF 11-16mm f/2.8"; lenses["00 48 29 3C 24 24 00 06"] = "Tokina AT-X 16-28 PRO FX AF 16-28mm f/2.8"; lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX AF 16-50mm f/2.8"; @@ -215,7 +273,7 @@ class NALensDataInterpreter : public Interpreter { lenses["00 48 80 80 30 30 00 00"] = "Nikkor 200mm f/4 AiS"; lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF 20-40mm f/2.7-3.5"; lenses["00 4C 6A 6A 20 20 00 00"] = "Nikkor 105mm f/2.5 AiS"; - lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF 180mm f/3.5 Di Model B01"; + lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF 180mm f/3.5 Di Model (B01)"; lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 (A16)"; lenses["00 54 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"; lenses["00 54 3C 3C 18 18 00 00"] = "Carl Zeiss Distagon T* 28mm f/2 ZF.2"; @@ -228,7 +286,7 @@ class NALensDataInterpreter : public Interpreter { lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm f/4 UV-VIS-IR Macro Apo"; lenses["00 54 62 62 0C 0C 00 00"] = "Carl Zeiss Planar T* 85mm f/1.4 ZF.2"; lenses["00 54 68 68 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 100mm f/2 ZF.2"; - lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 PRO D 100mm f/2.8"; + lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 PRO D 100mm f/2.8 Macro"; lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 PRO AF 300mm f/2.8"; lenses["00 58 64 64 20 20 00 00"] = "Soligor C/D Macro MC 90mm f/2.5"; lenses["01 00 00 00 00 00 02 00"] = "AF Teleconverter TC-16A 1.6x"; @@ -247,24 +305,25 @@ class NALensDataInterpreter : public Interpreter { lenses["02 40 44 73 2B 36 02 00"] = "Sigma 35-135mm f/3.5-4.5 a"; lenses["02 42 44 5C 2A 34 02 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5"; lenses["02 42 44 5C 2A 34 08 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5"; - lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm f/2.8 Macro"; + lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm f/2.8 Super Wide II Macro"; lenses["02 46 3C 5C 25 25 02 00"] = "Sigma 28-70mm f/2.8"; - lenses["02 46 5C 82 25 25 02 00"] = "Sigma APO 70-210mm f/2.8"; + lenses["02 46 5C 82 25 25 02 00"] = "Sigma 70-210mm f/2.8 APO"; + lenses["02 48 50 50 24 24 02 00"] = "Sigma 50mm f/2.8 Macro"; lenses["02 48 65 65 24 24 02 00"] = "Sigma 90mm f/2.8 Macro"; - lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D ZOOM UMCS 70-210mm f/4.5"; + lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D Zoom UMCS 70-210mm f/4.5"; lenses["03 48 5C 81 30 30 02 00"] = "AF Zoom-Nikkor 70-210mm f/4"; lenses["04 48 3C 3C 24 24 03 00"] = "AF Nikkor 28mm f/2.8"; lenses["05 54 50 50 0C 0C 04 00"] = "AF Nikkor 50mm f/1.4"; - lenses["06 3F 68 68 2C 2C 06 00"] = "Cosina 100mm f/3.5 Macro"; + lenses["06 3F 68 68 2C 2C 06 00"] = "Cosina AF 100mm f/3.5 Macro"; lenses["06 54 53 53 24 24 06 00"] = "AF Micro-Nikkor 55mm f/2.8"; lenses["07 36 3D 5F 2C 3C 03 00"] = "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro"; lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm f/3.5-4.5 MC"; - lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 N"; - lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF 19-35mm f/3.5-4.5"; - lenses["07 40 3C 5C 2C 35 03 00"] = "Tokina AF 270 II AF 28-70mm f/3.5-4.5"; + lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)"; + lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)"; + lenses["07 40 3C 5C 2C 35 03 00"] = "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)"; lenses["07 40 3C 62 2C 34 03 00"] = "AF Zoom-Nikkor 28-85mm f/3.5-4.5"; lenses["07 46 2B 44 24 30 03 02"] = "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)"; - lenses["07 46 3D 6A 25 2F 03 00"] = "Cosina AF Zoom 28-105mm F2.8-3.8 MC"; + lenses["07 46 3D 6A 25 2F 03 00"] = "Cosina AF Zoom 28-105mm f/2.8-3.8 MC"; lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD AF 28-70mm f/2.8-4.5"; lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF 28-70mm f/2.8"; lenses["08 40 44 6A 2C 34 04 00"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5"; @@ -282,6 +341,7 @@ class NALensDataInterpreter : public Interpreter { lenses["10 48 8E 8E 30 30 08 00"] = "AF Nikkor 300mm f/4 IF-ED"; lenses["11 48 44 5C 24 24 08 00"] = "AF Zoom-Nikkor 35-70mm f/2.8"; lenses["12 36 5C 81 35 3D 09 00"] = "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro"; + lenses["12 36 69 97 35 42 09 00"] = "Soligor AF Zoom 100-400mm f/4.5-6.7 MC"; lenses["12 39 5C 8E 34 3D 08 02"] = "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro"; lenses["12 3B 68 8D 3D 43 09 02"] = "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro"; lenses["12 3B 98 98 3D 3D 09 00"] = "Tokina AT-X 400 SD AF 400mm f/5.6"; @@ -306,14 +366,17 @@ class NALensDataInterpreter : public Interpreter { lenses["1F 54 6A 6A 24 24 14 00"] = "AF Micro-Nikkor 105mm f/2.8"; lenses["20 3C 80 98 3D 3D 1E 02"] = "Tamron AF 200-400mm f/5.6 LD IF (75D)"; lenses["20 48 60 80 24 24 15 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED"; + lenses["20 5A 64 64 20 20 14 00"] = "Tamron SP AF 90mm f/2.5 Macro (152E)"; lenses["21 40 3C 5C 2C 34 16 00"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5"; lenses["21 56 8E 8E 24 24 14 00"] = "Tamron SP AF 300mm f/2.8 LD-IF (60E)"; lenses["22 48 72 72 18 18 16 00"] = "AF DC-Nikkor 135mm f/2"; lenses["22 53 64 64 24 24 E0 02"] = "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)"; lenses["23 30 BE CA 3C 48 17 00"] = "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF"; lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF II 80-400mm f/4.5-5.6"; - lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor ED 80-200mm f/2.8D ED"; + lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; lenses["24 54 60 80 24 24 1A 02"] = "Tokina AT-X 828 AF PRO 80-200mm f/2.8"; + lenses["25 44 44 8E 34 42 1B 02"] = "Tokina AF 353 (AF 35-300mm f/4.5-6.7)"; + lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 270 AF PRO II 28-70mm f/2.6-2.8"; lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV 28-70mm f/2.8"; lenses["25 48 44 5C 24 24 1B 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; lenses["25 48 44 5C 24 24 52 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; @@ -344,9 +407,9 @@ class NALensDataInterpreter : public Interpreter { lenses["26 48 31 49 24 24 1C 02"] = "Sigma 20-40mm f/2.8"; lenses["26 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; lenses["26 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG"; - lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 High Speed Zoom"; + lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 DG High Speed Zoom"; lenses["26 48 3C 6A 24 30 1C 02"] = "Sigma 28-105mm f/2.8-4 Aspherical"; - lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO TELE MACRO 300mm f/4"; + lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO Tele Macro 300mm f/4"; lenses["26 54 2B 44 24 30 1C 02"] = "Sigma 17-35mm f/2.8-4 EX Aspherical"; lenses["26 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; lenses["26 54 37 73 24 34 1C 02"] = "Sigma 24-135mm f/2.8-4.5"; @@ -370,18 +433,21 @@ class NALensDataInterpreter : public Interpreter { lenses["2D 48 80 80 30 30 21 02"] = "AF Micro-Nikkor 200mm f/4D IF-ED"; lenses["2E 48 5C 82 30 3C 22 02"] = "AF Nikkor 70-210mm f/4-5.6D"; lenses["2E 48 5C 82 30 3C 28 02"] = "AF Nikkor 70-210mm f/4-5.6D"; - lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II AF 20-35mm f/3.5-4.5"; + lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II 20-35mm f/3.5-4.5"; + lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 193 19-35mm f/3.5-4.5"; lenses["2F 48 30 44 24 24 29 02"] = "AF Zoom-Nikkor 20-35mm f/2.8D IF"; + lenses["2F 48 30 44 24 24 29 02"] = "Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)"; lenses["30 48 98 98 24 24 24 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED"; lenses["30 48 98 98 24 24 E1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"; lenses["30 48 98 98 24 24 F1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E"; lenses["30 48 98 98 24 24 F2 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E"; lenses["31 54 56 56 24 24 25 02"] = "AF Micro-Nikkor 60mm f/2.8D"; - lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:2 (172/272E)"; + lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (172E/272E)"; lenses["32 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro"; lenses["32 54 6A 6A 24 24 35 02"] = "AF Micro-Nikkor 105mm f/2.8D"; + lenses["32 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm f/2.8 EX DG"; lenses["33 48 2D 2D 24 24 31 02"] = "AF Nikkor 18mm f/2.8D"; - lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro"; + lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09)"; lenses["34 48 29 29 24 24 32 02"] = "AF Fisheye Nikkor 16mm f/2.8D"; lenses["35 3C A0 A0 30 30 33 02"] = "AF-I Nikkor 500mm f/4D IF-ED"; lenses["35 3C A0 A0 30 30 E1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"; @@ -399,7 +465,7 @@ class NALensDataInterpreter : public Interpreter { lenses["41 48 7C 7C 24 24 43 02"] = "AF Nikkor 180mm f/2.8D IF-ED"; lenses["42 54 44 44 18 18 44 02"] = "AF Nikkor 35mm f/2D"; lenses["43 54 50 50 0C 0C 46 02"] = "AF Nikkor 50mm f/1.4D"; - lenses["44 44 60 80 34 3C 47 02"] = "AF Zoom-Nikkor 80-200mm f/4.5-5.6D "; + lenses["44 44 60 80 34 3C 47 02"] = "AF Zoom-Nikkor 80-200mm f/4.5-5.6D"; lenses["45 3D 3C 60 2C 3C 48 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; lenses["45 40 3C 60 2C 3C 48 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"; lenses["45 41 37 72 2C 3C 48 02"] = "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)"; @@ -408,7 +474,7 @@ class NALensDataInterpreter : public Interpreter { lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX Aspherical DG HSM"; lenses["48 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; lenses["48 3C 50 A0 30 40 4B 02"] = "Sigma 50-500mm f/4-6.3 EX APO RF HSM"; - lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800 f/5.6 EX DG HSM"; + lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800mm f/5.6 EX DG HSM"; lenses["48 3C B0 B0 3C 3C 4B 02"] = "Sigma APO 800mm f/5.6 EX HSM"; lenses["48 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX HSM"; lenses["48 48 24 24 24 24 4B 02"] = "Sigma 14mm f/2.8 EX Aspherical HSM"; @@ -420,7 +486,7 @@ class NALensDataInterpreter : public Interpreter { lenses["48 48 8E 8E 24 24 F1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E"; lenses["48 48 8E 8E 24 24 F2 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E"; lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma 180mm f/3.5 EX DG Macro"; - lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO MACRO 180mm f/3.5 EX DG HSM"; + lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO Macro 180mm f/3.5 EX DG HSM"; lenses["48 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; lenses["48 54 5C 80 24 24 4B 02"] = "Sigma 70-200mm f/2.8 EX APO IF HSM"; lenses["48 54 6F 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; @@ -429,7 +495,10 @@ class NALensDataInterpreter : public Interpreter { lenses["49 3C A6 A6 30 30 E1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"; lenses["49 3C A6 A6 30 30 F1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-14E"; lenses["49 3C A6 A6 30 30 F2 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-20E"; + lenses["4A 40 11 11 2C 0C 4D 02"] = "Samyang 8mm f/3.5 Fish-Eye CS"; + lenses["4A 48 24 24 24 0C 4D 02"] = "Samyang AE 14mm f/2.8 ED AS IF UMC"; lenses["4A 54 62 62 0C 0C 4D 02"] = "AF Nikkor 85mm f/1.4D IF"; + lenses["4A 60 44 44 0C 0C 4D 02"] = "Samyang 35mm f/1.4 AS UMC"; lenses["4A 60 62 62 0C 0C 4D 02"] = "Samyang AE 85mm f/1.4 AS IF UMC"; lenses["4B 3C A0 A0 30 30 4E 02"] = "AF-S Nikkor 500mm f/4D IF-ED"; lenses["4B 3C A0 A0 30 30 E1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"; @@ -445,6 +514,7 @@ class NALensDataInterpreter : public Interpreter { lenses["53 48 60 80 24 24 57 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; lenses["53 48 60 80 24 24 60 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; lenses["54 44 5C 7C 34 3C 58 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; + lenses["54 44 5C 7C 34 3C 61 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; lenses["56 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 APO Macro Super II"; lenses["56 48 5C 8E 30 3C 5A 02"] = "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"; lenses["59 48 98 98 24 24 5D 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED"; @@ -486,13 +556,14 @@ class NALensDataInterpreter : public Interpreter { lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma 70mm f/2.8 EX DG Macro"; lenses["7A 3B 53 80 30 3C 4B 06"] = "Sigma 55-200mm f/4-5.6 DC HSM"; lenses["7A 3C 1F 37 30 30 7E 06"] = "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"; + lenses["7A 3C 1F 37 30 30 7E 06"] = "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)"; lenses["7A 40 2D 50 2C 3C 4B 06"] = "Sigma 18-50mm f/3.5-5.6 DC HSM"; lenses["7A 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM"; lenses["7A 47 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"; - lenses["7A 47 50 76 24 24 4B 06"] = "Sigma APO 50-150mm f/2.8 EX DC HSM"; + lenses["7A 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM"; lenses["7A 48 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"; - lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC HSM"; - lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma APO 70-200mm f/2.8 EX DG Macro HSM II"; + lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; + lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"; lenses["7A 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; lenses["7B 48 80 98 30 30 80 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"; lenses["7D 48 2B 53 24 24 82 06"] = "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"; @@ -506,16 +577,20 @@ class NALensDataInterpreter : public Interpreter { lenses["89 3C 53 80 30 3C 8B 06"] = "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"; lenses["8A 54 6A 6A 24 24 8C 0E"] = "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"; lenses["8B 40 2D 80 2C 3C 8D 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"; - lenses["8B 40 2D 80 2C 3C FD 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"; + lenses["8B 40 2D 80 2C 3C FD 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]"; lenses["8C 40 2D 53 2C 3C 8E 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED"; lenses["8D 44 5C 8E 34 3C 8F 0E"] = "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED"; + lenses["8E 3C 2B 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM Contemporary"; lenses["8F 40 2D 72 2C 3C 91 06"] = "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED"; lenses["90 3B 53 80 30 3C 92 0E"] = "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED"; + lenses["91 54 44 44 0C 0C 4B 06"] = "Sigma 35mm f/1.4 DG HSM | A"; + lenses["92 2C 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM"; lenses["92 48 24 37 24 24 94 06"] = "AF-S Zoom-Nikkor 14-24mm f/2.8G ED"; lenses["93 48 37 5C 24 24 95 06"] = "AF-S Zoom-Nikkor 24-70mm f/2.8G ED"; lenses["94 40 2D 53 2C 3C 96 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II"; lenses["95 00 37 37 2C 2C 97 06"] = "PC-E Nikkor 24mm f/3.5D ED"; lenses["95 4C 37 37 2C 2C 97 02"] = "PC-E Nikkor 24mm f/3.5D ED"; + lenses["96 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 II DG HSM"; lenses["96 48 98 98 24 24 98 0E"] = "AF-S VR Nikkor 400mm f/2.8G ED"; lenses["97 3C A0 A0 30 30 99 0E"] = "AF-S VR Nikkor 500mm f/4G ED"; lenses["98 3C A6 A6 30 30 9A 0E"] = "AF-S VR Nikkor 600mm f/4G ED"; @@ -523,12 +598,19 @@ class NALensDataInterpreter : public Interpreter { lenses["9A 40 2D 53 2C 3C 9C 0E"] = "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G"; lenses["9B 00 4C 4C 24 24 9D 06"] = "PC-E Micro Nikkor 45mm f/2.8D ED"; lenses["9B 54 4C 4C 24 24 9D 02"] = "PC-E Micro Nikkor 45mm f/2.8D ED"; + lenses["9B 54 62 62 0C 0C 4B 06"] = "Sigma 85mm f/1.4 EX DG HSM"; + lenses["9C 48 5C 80 24 24 4B 0E"] = "Sigma 70-200mm f/2.8 EX DG OS HSM"; lenses["9C 54 56 56 24 24 9E 06"] = "AF-S Micro Nikkor 60mm f/2.8G ED"; lenses["9D 00 62 62 24 24 9F 06"] = "PC-E Micro Nikkor 85mm f/2.8D"; + lenses["9D 48 2B 50 24 24 4B 0E"] = "Sigma 17-50mm f/2.8 EX DC OS HSM"; lenses["9D 54 62 62 24 24 9F 02"] = "PC-E Micro Nikkor 85mm f/2.8D"; + lenses["9E 38 11 29 34 3C 4B 06"] = "Sigma 8-16mm f/4.5-5.6 DC HSM"; lenses["9E 40 2D 6A 2C 3C A0 0E"] = "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"; lenses["9F 37 50 A0 34 40 4B 0E"] = "Sigma 50-500mm f/4.5-6.3 DG OS HSM"; lenses["9F 58 44 44 14 14 A1 06"] = "AF-S DX Nikkor 35mm f/1.8G"; + lenses["A0 48 2A 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM"; + lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical"; + lenses["8B 4C 2D 44 14 14 4B 06"] = "Sigma 18-35mm f/1.8 DC HSM"; lenses["A0 54 50 50 0C 0C A2 06"] = "AF-S Nikkor 50mm f/1.4G"; lenses["A1 40 18 37 2C 34 A3 06"] = "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED"; lenses["A1 41 19 31 2C 2C 4B 06"] = "Sigma 10-20mm f/3.5 EX DC HSM"; @@ -543,24 +625,37 @@ class NALensDataInterpreter : public Interpreter { lenses["A6 48 8E 8E 24 24 A8 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED II"; lenses["A7 49 80 A0 24 24 4B 06"] = "Sigma APO 200-500mm f/2.8 EX DG"; lenses["A7 4B 62 62 2C 2C A9 0E"] = "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"; + lenses["A8 48 80 98 30 30 AA 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II"; lenses["A9 54 80 80 18 18 AB 0E"] = "AF-S Nikkor 200mm f/2G ED VR II"; lenses["AA 3C 37 6E 30 30 AC 0E"] = "AF-S Nikkor 24-120mm f/4G ED VR"; lenses["AC 38 53 8E 34 3C AE 0E"] = "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED"; + lenses["AD 3C 2D 8E 2C 3C AF 0E"] = "AF-S DX Nikkor 18-300mm 3.5-5.6G ED VR"; lenses["AE 54 62 62 0C 0C B0 06"] = "AF-S Nikkor 85mm f/1.4G"; lenses["AF 54 44 44 0C 0C B1 06"] = "AF-S Nikkor 35mm f/1.4G"; + lenses["B0 4C 50 50 14 14 B2 06"] = "AF-S Nikkor 50mm f/1.8G"; + lenses["B1 48 48 48 24 24 B3 06"] = "AF-S DX Micro Nikkor 40mm f/2.8G"; + lenses["B2 48 5C 80 30 30 B4 0E"] = "AF-S Nikkor 70-200mm f/4G ED VR"; + lenses["B3 4C 62 62 14 14 B5 06"] = "AF-S Nikkor 85mm f/1.8G"; + lenses["B4 40 37 62 2C 34 B6 0E"] = "AF-S VR Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"; + lenses["B5 4C 3C 3C 14 14 B7 06"] = "AF-S Nikkor 28mm f/1.8G"; lenses["B6 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; + lenses["B7 44 60 98 34 3C B9 0E"] = "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"; + lenses["B8 40 2D 44 2C 34 BA 06"] = "AF-S Nikkor 18-35mm f/3.5-4.5G ED"; lenses["CD 3D 2D 70 2E 3C 4B 0E"] = "Sigma 18-125mm f/3.8-5.6 DC OS HSM"; - lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma APO 150-500mm f/5-6.3 DG OS HSM"; + lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma 150-500mm f/5-6.3 DG OS APO HSM"; lenses["CF 38 6E 98 34 3C 4B 0E"] = "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM"; lenses["DC 48 19 19 24 24 4B 06"] = "Sigma 10mm f/2.8 EX DC HSM Fisheye"; lenses["DE 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 EX DG HSM"; - lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma APO 70-300mm f/4-5.6 DG Macro HSM"; + lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma 70-300mm f/4-5.6 APO DG Macro HSM"; lenses["E1 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro"; + lenses["E3 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro"; lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma 105mm f/2.8 EX DG Macro"; + lenses["E6 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro"; lenses["E9 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; lenses["ED 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM"; - lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma APO 70-200mm f/2.8 EX DG Macro HSM II"; + lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"; lenses["F0 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"; + lenses["F0 3F 2D 8A 2C 40 DF 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)"; lenses["F1 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX DG HSM"; lenses["F1 47 5C 8E 30 3C DF 0E"] = "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"; lenses["F3 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM"; @@ -570,17 +665,25 @@ class NALensDataInterpreter : public Interpreter { lenses["F5 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM"; lenses["F6 3F 18 37 2C 34 84 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"; lenses["F6 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; + lenses["F7 53 5C 80 24 24 40 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; lenses["F7 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; lenses["F8 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; - lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; + lenses["F8 54 64 64 24 24 DF 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; lenses["F9 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; lenses["F9 40 3C 8E 2C 40 40 0E"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)"; lenses["FA 54 3C 5E 24 24 84 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"; + lenses["FA 54 3C 5E 24 24 DF 06"] = "Tamron SP AF 28-75mm f//2.8 XR Di LD Aspherical (IF) Macro (A09NII)"; + lenses["FA 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; + lenses["FB 54 2B 50 24 24 84 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"; lenses["FB 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM"; - lenses["FD 47 50 76 24 24 4B 06"] = "Sigma APO 50-150mm f/2.8 EX DC HSM II"; + lenses["FC 40 2D 80 2C 40 DF 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)"; + lenses["FD 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM II"; lenses["FE 47 00 00 24 24 4B 06"] = "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"; + lenses["FE 48 37 5C 24 24 DF 0E"] = "Tamron SP 24-70mm f/2.8 Di VC USD"; lenses["FE 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; + lenses["FE 54 5C 80 24 24 DF 0E"] = "Tamron SP AF 70-200mm f//2.8 Di VC USD (A009)"; + lenses["FE 54 64 64 24 24 DF 0E"] = "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1"; } virtual std::string toString (Tag* t) { @@ -629,7 +732,8 @@ class NALensDataInterpreter : public Interpreter { lid.setf (std::ios_base::hex, std::ios_base::basefield); lid.setf (std::ios_base::uppercase); - std::string model = t->getParent()->getParent()->getParent()->getTag(0x0110)->valueToString(); + Tag *modelTag = t->getParent()->getRoot()->findTag("Model"); + std::string model( modelTag? modelTag->valueToString():""); int lidoffs = 7; bool d100 = false; if (model.substr(0,10)=="NIKON D100" || model.substr(0,9)=="NIKON D1X") { @@ -700,90 +804,98 @@ class NALensDataInterpreter : public Interpreter { }; NALensDataInterpreter naLensDataInterpreter; +const TagAttrib nikonISOInfoAttribs[] = { + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, 0, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, + {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, 0, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + const TagAttrib nikon2Attribs[] = { - {0, 1, 0, 0, 0x0002, "Unknown", &stdInterpreter}, - {0, 1, 0, 0, 0x0003, "Quality", &stdInterpreter}, - {0, 1, 0, 0, 0x0004, "ColorMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0005, "ImageAdjustment", &stdInterpreter}, - {0, 1, 0, 0, 0x0006, "ISOSpeed", &naISOInterpreter}, - {0, 1, 0, 0, 0x0007, "WhiteBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x0008, "Focus", &stdInterpreter}, - {0, 1, 0, 0, 0x0009, "Unknown", &stdInterpreter}, - {0, 1, 0, 0, 0x000a, "DigitalZoom", &stdInterpreter}, - {0, 1, 0, 0, 0x000b, "AuxiliaryLens", &stdInterpreter}, - {0, 1, 0, 0, 0x0f00, "Unknown", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0002, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0003, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0004, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, 0, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Focus", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0009, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "Unknown", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib nikon3Attribs[] = { - {0, 1, 0, 0, 0x0001, "MakerNoteVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0002, "ISOSpeed", &naISOInterpreter}, - {0, 1, 0, 0, 0x0003, "ColorMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0004, "Quality", &stdInterpreter}, - {0, 1, 0, 0, 0x0005, "WhiteBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x0006, "Sharpness", &stdInterpreter}, - {0, 1, 0, 0, 0x0007, "FocusMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0008, "FlashSetting", &stdInterpreter}, - {0, 1, 0, 0, 0x0009, "FlashType", &stdInterpreter}, - {0, 1, 0, 0, 0x000b, "WhiteBalanceFineTune", &stdInterpreter}, - {0, 3, 0, 0, 0x000c, "ColorBalance1", &stdInterpreter}, - {0, 1, 0, 0, 0x000d, "ProgramShift", &stdInterpreter}, - {0, 1, 0, 0, 0x000e, "ExposureDifference", &stdInterpreter}, - {0, 1, 0, 0, 0x000f, "ISOSelection", &naISOInterpreter}, - {0, 1, 0, 0, 0x0010, "DataDump", &stdInterpreter}, - {1, 1, 0, 0, 0x0011, "NikonPreview", &stdInterpreter}, - {0, 1, 0, 0, 0x0012, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0, 0x0013, "ISOSetting", &stdInterpreter}, - {0, 1, 0, 0, 0x0016, "ImageBoundary", &stdInterpreter}, - {0, 1, 0, 0, 0x0018, "FlashExposureBracketValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0019, "ExposureBracketValue", &stdInterpreter}, - {0, 1, 0, 0, 0x001a, "ImageProcessing", &stdInterpreter}, - {0, 1, 0, 0, 0x001b, "CropHiSpeed", &stdInterpreter}, - {0, 1, 0, 0, 0x001d, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x001e, "ColorSpace", &stdInterpreter}, - {0, 1, 0, 0, 0x0020, "ImageAuthentication", &stdInterpreter}, - {0, 1, 0, 0, 0x0080, "ImageAdjustment", &stdInterpreter}, - {0, 1, 0, 0, 0x0081, "ToneComp", &stdInterpreter}, - {0, 1, 0, 0, 0x0082, "AuxiliaryLens", &stdInterpreter}, - {0, 1, 0, 0, 0x0083, "LensType", &naLensTypeInterpreter}, - {0, 1, 0, 0, 0x0084, "Lens", &stdInterpreter}, - {0, 1, 0, 0, 0x0085, "ManualFocusDistance", &stdInterpreter}, - {0, 1, 0, 0, 0x0086, "DigitalZoom", &stdInterpreter}, - {0, 1, 0, 0, 0x0087, "FlashMode", &naFlashModeInterpreter}, - {0, 1, 0, 0, 0x0088, "AFInfo", &naAFInfoInterpreter}, - {0, 1, 0, 0, 0x0089, "ShootingMode", &naShootingModeInterpreter}, - {0, 1, 0, 0, 0x008a, "AutoBracketRelease", &stdInterpreter}, - {0, 1, 0, 0, 0x008b, "LensFStops", &stdInterpreter}, - {0, 1, 0, 0, 0x008c, "NEFCurve1", &stdInterpreter}, - {0, 1, 0, 0, 0x008d, "ColorHue", &stdInterpreter}, - {0, 1, 0, 0, 0x008f, "SceneMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0090, "LightSource", &stdInterpreter}, - {0, 1, 0, 0, 0x0091, "ShotInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0092, "HueAdjustment", &stdInterpreter}, - {0, 1, 0, 0, 0x0094, "Saturation", &stdInterpreter}, - {0, 1, 0, 0, 0x0095, "NoiseReduction", &stdInterpreter}, - {0, 1, 0, 0, 0x0096, "NEFCurve2", &stdInterpreter}, - {0, 3, 0, 0, 0x0097, "ColorBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x0098, "LensData", &naLensDataInterpreter}, - {0, 1, 0, 0, 0x0099, "RawImageCenter", &stdInterpreter}, - {0, 1, 0, 0, 0x009a, "SensorPixelSize", &stdInterpreter}, - {0, 1, 0, 0, 0x00a0, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x00a2, "ImageDataSize", &stdInterpreter}, - {0, 1, 0, 0, 0x00a5, "ImageCount", &stdInterpreter}, - {0, 1, 0, 0, 0x00a6, "DeletedImageCount", &stdInterpreter}, - {0, 1, 0, 0, 0x00a7, "ShutterCount", &stdInterpreter}, - {0, 1, 0, 0, 0x00a9, "ImageOptimization", &stdInterpreter}, - {0, 1, 0, 0, 0x00aa, "Saturation", &stdInterpreter}, - {0, 1, 0, 0, 0x00ab, "VariProgram", &stdInterpreter}, - {0, 1, 0, 0, 0x00ac, "ImageStabilization", &stdInterpreter}, - {0, 1, 0, 0, 0x00ad, "AFResponse", &stdInterpreter}, - {0, 1, 0, 0, 0x00b0, "MultiExposure", &stdInterpreter}, - {0, 1, 0, 0, 0x00b1, "HighISONoiseReduction", &naHiISONRInterpreter}, - {0, 1, 0, 0, 0x0e00, "PrintIM", &stdInterpreter}, - {0, 0, 0, 0, 0x0e01, "NikonCaptureData", &stdInterpreter}, - {0, 0, 0, 0, 0x0e09, "NikonCaptureVersion", &stdInterpreter}, - {0, 0, 0, 0, 0x0e0e, "NikonCaptureOffsets", &stdInterpreter}, - {0, 0, 0, 0, 0x0e10, "NikonScanIFD", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0004, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0007, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0009, AUTO, "FlashType", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_NEW, 0, 0, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, + {0, AC_WRITE, 0, 0, 0x0010, AUTO, "DataDump", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, + {0, AC_WRITE, 0, nikonISOInfoAttribs, 0x0025, AUTO, "ISOInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0081, AUTO, "ToneComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0084, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, + {0, AC_WRITE, 0, 0, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x008b, AUTO, "LensFStops", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x008d, AUTO, "ColorHue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x008f, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0090, AUTO, "LightSource", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0094, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, + {0, AC_NEW, 0, 0, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, + {0, AC_WRITE, 0, 0, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, + {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; } #endif diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc index 9cc6206d0..d858b64f0 100644 --- a/rtexif/olympusattribs.cc +++ b/rtexif/olympusattribs.cc @@ -67,8 +67,8 @@ OLApertureInterpreter olApertureInterpreter; class OLLensTypeInterpreter : public Interpreter { std::map lenses; public: - OLLensTypeInterpreter () { - // exadecimal bytes + OLLensTypeInterpreter () { // From EXIFTOOL database 'Olympus.pm' V2.09 + // exadecimal bytes lenses["00 01 00"] = "Zuiko Digital ED 50mm f/2 Macro"; lenses["00 01 01"] = "Zuiko Digital 40-150mm f/3.5-4.5"; lenses["00 01 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6"; @@ -79,15 +79,29 @@ class OLLensTypeInterpreter : public Interpreter { lenses["00 04 10"] = "Zuiko Digital ED 9-18mm f/4-5.6"; lenses["00 05 00"] = "Zuiko Digital 14-54mm f/2.8-3.5"; lenses["00 05 01"] = "Zuiko Digital Pro ED 90-250mm f/2.8"; - lenses["00 05 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 "; + lenses["00 05 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 L"; lenses["00 06 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5"; lenses["00 06 01"] = "Zuiko Digital ED 8mm f/3.5 Fisheye"; + lenses["00 06 10"] = "Zuiko Digital ED 40-150mm f/4-5.6"; lenses["00 07 00"] = "Zuiko Digital 11-22mm f/2.8-3.5"; lenses["00 07 01"] = "Zuiko Digital 18-180mm f/3.5-6.3"; + lenses["00 07 10"] = "Zuiko Digital ED 12mm f/2"; lenses["00 08 01"] = "Zuiko Digital 70-300mm f/4-5.6"; + lenses["00 08 10"] = "Zuiko Digital ED 75-300mm f/4.8-6.7"; + lenses["00 09 10"] = "Zuiko Digital 14-42mm f/3.5-5.6 II"; + lenses["00 10 01"] = "Kenko Tokina Reflex 300mm f/6.3 MF Macro"; + lenses["00 10 10"] = "Zuiko Digital ED 12-50mm f/3.5-6.3 EZ"; + lenses["00 11 10"] = "Zuiko Digital 45mm f/1.8"; + lenses["00 12 10"] = "Zuiko Digital ED 60mm f/2.8 Macro"; + lenses["00 13 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 II R"; + lenses["00 14 10"] = "Zuiko Digital ED 40-150mm f/4-5.6 R"; lenses["00 15 00"] = "Zuiko Digital ED 7-14mm f/4"; + lenses["00 15 10"] = "Zuiko Digital ED 75mm f/1.8"; + lenses["00 16 10"] = "Zuiko Digital 17mm f/1.8"; lenses["00 17 00"] = "Zuiko Digital Pro ED 35-100mm f/2"; lenses["00 18 00"] = "Zuiko Digital 14-45mm f/3.5-5.6"; + lenses["00 18 10"] = "Zuiko Digital ED 75-300mm f/4.8-6.7 II"; + lenses["00 19 10"] = "Zuiko Digital ED 12-40mm f/2.8 Pro"; lenses["00 20 00"] = "Zuiko Digital 35mm f/3.5 Macro"; lenses["00 22 00"] = "Zuiko Digital 17.5-45mm f/3.5-5.6"; lenses["00 23 00"] = "Zuiko Digital ED 14-42mm f/3.5-5.6"; @@ -98,31 +112,52 @@ class OLLensTypeInterpreter : public Interpreter { lenses["00 33 00"] = "Zuiko Digital 25mm f/2.8"; lenses["00 34 00"] = "Zuiko Digital ED 9-18mm f/4-5.6"; lenses["00 35 00"] = "Zuiko Digital 14-54mm f/2.8-3.5 II"; - lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6"; + lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6 DC"; + lenses["01 01 10"] = "Sigma 30mm f/2.8 EX DN"; lenses["01 02 00"] = "Sigma 55-200mm f/4-5.6 DC"; + lenses["01 02 10"] = "Sigma 19mm f/2.8 EX DN"; lenses["01 03 00"] = "Sigma 18-125mm f/3.5-5.6 DC"; - lenses["01 04 00"] = "Sigma 18-125mm f/3.5-5.6"; - lenses["01 05 00"] = "Sigma 30mm f/1.4 DC"; + lenses["01 03 10"] = "Sigma 30mm f/2.8 DN | A"; + lenses["01 04 00"] = "Sigma 18-125mm f/3.5-5.6 DC"; + lenses["01 04 10"] = "Sigma 19mm f/2.8 DN | A"; + lenses["01 05 00"] = "Sigma 30mm f/1.4 EX DC HSM"; + lenses["01 05 10"] = "Sigma 60mm f/2.8 DN | A"; lenses["01 06 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM RF"; - lenses["01 07 00"] = "Sigma 105mm f/2.8 DG"; - lenses["01 08 00"] = "Sigma 150mm f/2.8 DG HSM"; + lenses["01 07 00"] = "Sigma 105mm f/2.8 EX DG Macro"; + lenses["01 08 00"] = "Sigma 150mm f/2.8 EX DG APO HSM Macro"; + lenses["01 09 00"] = "Sigma 18-50mm f/2.8 EX DC Macro"; lenses["01 10 00"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro"; - lenses["01 11 00"] = "Sigma 135-400mm f/4.5-5.6 DG ASP APO RF"; - lenses["01 12 00"] = "Sigma 300-800mm f/5.6 EX DG APO"; - lenses["01 14 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM RF"; + lenses["01 11 00"] = "Sigma 135-400mm f/4.5-5.6 DG APO"; + lenses["01 12 00"] = "Sigma 300-800mm f/5.6 EX DG APO HSM"; + lenses["01 13 00"] = "Sigma 30mm f/1.4 EX DC HSM"; + lenses["01 14 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM"; lenses["01 15 00"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; - lenses["01 16 00"] = "Sigma 70-200mm f/2.8 EX DG Macro HSM II"; + lenses["01 16 00"] = "Sigma 70-200mm f/2.8 II EX DG APO HSM Macro"; lenses["01 17 00"] = "Sigma 50mm f/1.4 EX DG HSM"; lenses["02 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph."; lenses["02 01 10"] = "Lumix G Vario 14-45mm f/3.5-5.6 Asph. Mega OIS"; lenses["02 02 00"] = "Leica D Summilux 25mm f/1.4 Asph."; lenses["02 02 10"] = "Lumix G Vario 45-200mm f/4-5.6 Mega OIS"; + lenses["02 03 00"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph. Mega OIS"; lenses["02 03 01"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph."; - lenses["02 03 10"] = "Lumix G Vario HD 14-140mm f(4-5.8 Asph. Mega OIS "; + lenses["02 03 10"] = "Lumix G Vario HD 14-140mm f/4-5.8 Asph. Mega OIS"; lenses["02 04 00"] = "Leica D Vario Elmar 14-150mm f/3.5-5.6"; lenses["02 04 10"] = "Lumix G Vario 7-14mm f/4 Asph."; lenses["02 05 10"] = "Lumix G 20mm f/1.7 Asph."; - lenses["02 08 10"] = "Lumix G Fisheye 8mm f/3.5 "; + lenses["02 06 10"] = "Leica DG Macro-Elmarit 45mm f/2.8 Asph. Mega OIS"; + lenses["02 07 10"] = "Lumix G Vario 14-42mm f/3.5-5.6 Asph. Mega OIS"; + lenses["02 08 10"] = "Lumix G Fisheye 8mm f/3.5"; + lenses["02 09 10"] = "Lumix G Vario 100-300mm f/4-5.6 Mega OIS"; + lenses["02 10 10"] = "Lumix G 14mm f/2.5 Asph."; + lenses["02 11 10"] = "Lumix G 12.5mm f/12 3D"; + lenses["02 12 10"] = "Leica DG Summilux 25mm f/1.4 Asph."; + lenses["02 13 10"] = "Lumix G X Vario PZ 45-175mm f/4-5.6 Asph. Power OIS"; + lenses["02 14 10"] = "Lumix G X Vario PZ 14-42mm f/3.5-5.6 Asph. Power OIS"; + lenses["02 15 10"] = "Lumix G X Vario 12-35mm f/2.8 Asph. Power OIS"; + lenses["02 16 10"] = "Lumix G Vario 45-150mm f/4-5.6 Asph. Mega OIS"; + lenses["02 17 10"] = "Lumix G X Vario 35-100mm f/2.8 Power OIS"; + lenses["02 18 10"] = "Lumix G Vario 14-42mm f/3.5-5.6 II Asph. Mega OIS"; + lenses["02 19 10"] = "Lumix G Vario 14-140mm f/3.5-5.6 Asph. Power OIS"; lenses["03 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph."; lenses["03 02 00"] = "Leica D Summilux 25mm f/1.4 Asph."; } @@ -404,298 +439,298 @@ class OLFlashModelInterpreter : public ChoiceInterpreter { OLFlashModelInterpreter olFlashModelInterpreter; const TagAttrib olyFocusInfoAttribs[] = { - {0, 1, 0, 0, 0x0000, "FocusInfoVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0209, "AutoFocus", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0210, "SceneDetect", &stdInterpreter}, - {0, 1, 0, 0, 0x0211, "SceneArea", &stdInterpreter}, - {0, 1, 0, 0, 0x0212, "SceneDetectData", &stdInterpreter}, - {0, 1, 0, 0, 0x0300, "ZoomStepCount", &stdInterpreter}, - {0, 1, 0, 0, 0x0301, "FocusStepCount", &stdInterpreter}, - {0, 1, 0, 0, 0x0303, "FocusStepInfinity", &stdInterpreter}, - {0, 1, 0, 0, 0x0304, "FocusStepNear", &stdInterpreter}, - {0, 1, 0, 0, 0x0305, "FocusDistance", &stdInterpreter}, - {0, 1, 0, 0, 0x0308, "AFPoint", &stdInterpreter}, - {0, 1, 0, 0, 0x1201, "ExternalFlash", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x1203, "ExternalFlashGuideNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x1204, "ExternalFlashBounce", &stdInterpreter}, - {0, 1, 0, 0, 0x1205, "ExternalFlashZoom", &stdInterpreter}, - {0, 1, 0, 0, 0x1208, "InternalFlash", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x1209, "ManualFlash", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x1500, "SensorTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x1600, "ImageStabilization", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0211, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0308, AUTO, "AFPoint", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib olyImageProcessingAttribs[] = { - {0, 1, 0, 0, 0x0000, "ImageProcessingVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0100, "WB_RBLevels", &stdInterpreter}, - {0, 1, 0, 0, 0x0102, "WB_RBLevels3000K", &stdInterpreter}, - {0, 1, 0, 0, 0x0103, "WB_RBLevels3300K", &stdInterpreter}, - {0, 1, 0, 0, 0x0104, "WB_RBLevels3600K", &stdInterpreter}, - {0, 1, 0, 0, 0x0105, "WB_RBLevels3900K", &stdInterpreter}, - {0, 1, 0, 0, 0x0106, "WB_RBLevels4000K", &stdInterpreter}, - {0, 1, 0, 0, 0x0107, "WB_RBLevels4300K", &stdInterpreter}, - {0, 1, 0, 0, 0x0108, "WB_RBLevels4500K", &stdInterpreter}, - {0, 1, 0, 0, 0x0109, "WB_RBLevels4800K", &stdInterpreter}, - {0, 1, 0, 0, 0x010a, "WB_RBLevels5300K", &stdInterpreter}, - {0, 1, 0, 0, 0x010b, "WB_RBLevels6000K", &stdInterpreter}, - {0, 1, 0, 0, 0x010c, "WB_RBLevels6600K", &stdInterpreter}, - {0, 1, 0, 0, 0x010d, "WB_RBLevels7500K", &stdInterpreter}, - {0, 1, 0, 0, 0x010e, "WB_RBLevelsCWB1", &stdInterpreter}, - {0, 1, 0, 0, 0x010f, "WB_RBLevelsCWB2", &stdInterpreter}, - {0, 1, 0, 0, 0x0110, "WB_RBLevelsCWB3", &stdInterpreter}, - {0, 1, 0, 0, 0x0111, "WB_RBLevelsCWB4", &stdInterpreter}, - {0, 1, 0, 0, 0x0113, "WB_GLevel3000K", &stdInterpreter}, - {0, 1, 0, 0, 0x0114, "WB_GLevel3300K", &stdInterpreter}, - {0, 1, 0, 0, 0x0115, "WB_GLevel3600K", &stdInterpreter}, - {0, 1, 0, 0, 0x0116, "WB_GLevel3900K", &stdInterpreter}, - {0, 1, 0, 0, 0x0117, "WB_GLevel4000K", &stdInterpreter}, - {0, 1, 0, 0, 0x0118, "WB_GLevel4300K", &stdInterpreter}, - {0, 1, 0, 0, 0x0119, "WB_GLevel4500K", &stdInterpreter}, - {0, 1, 0, 0, 0x011a, "WB_GLevel4800K", &stdInterpreter}, - {0, 1, 0, 0, 0x011b, "WB_GLevel5300K", &stdInterpreter}, - {0, 1, 0, 0, 0x011c, "WB_GLevel6000K", &stdInterpreter}, - {0, 1, 0, 0, 0x011d, "WB_GLevel6600K", &stdInterpreter}, - {0, 1, 0, 0, 0x011e, "WB_GLevel7500K", &stdInterpreter}, - {0, 1, 0, 0, 0x011f, "WB_GLevel", &stdInterpreter}, - {0, 1, 0, 0, 0x0200, "ColorMatrix", &stdInterpreter}, - {0, 1, 0, 0, 0x0300, "Enhancer", &stdInterpreter}, - {0, 1, 0, 0, 0x0301, "EnhancerValues", &stdInterpreter}, - {0, 1, 0, 0, 0x0310, "CoringFilter", &stdInterpreter}, - {0, 1, 0, 0, 0x0311, "CoringValues", &stdInterpreter}, - {0, 1, 0, 0, 0x0600, "BlackLevel2", &stdInterpreter}, - {0, 1, 0, 0, 0x0610, "GainBase", &stdInterpreter}, - {0, 1, 0, 0, 0x0611, "ValidBits", &stdInterpreter}, - {0, 1, 0, 0, 0x0612, "CropLeft", &stdInterpreter}, - {0, 1, 0, 0, 0x0613, "CropTop", &stdInterpreter}, - {0, 1, 0, 0, 0x0614, "CropWidth", &stdInterpreter}, - {0, 1, 0, 0, 0x0615, "CropHeight", &stdInterpreter}, - {0, 1, 0, 0, 0x1010, "NoiseReduction2", &stdInterpreter}, - {0, 1, 0, 0, 0x1011, "DistortionCorrection2", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x1012, "ShadingCompensation2", &olOnOffInterpreter}, - {1, 1, 0, 0, 0x1103, "UnknownBlock", &stdInterpreter}, - {0, 1, 0, 0, 0x1200, "FaceDetect", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x1201, "FaceDetectArea", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0300, AUTO, "Enhancer", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0311, AUTO, "CoringValues", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0610, AUTO, "GainBase", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0611, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0612, AUTO, "CropLeft", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0613, AUTO, "CropTop", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0614, AUTO, "CropWidth", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0615, AUTO, "CropHeight", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, + {1, AC_WRITE, 0, 0, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib olyRawDevelopmentAttribs[] = { - {0, 1, 0, 0, 0x0000, "RawDevVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0100, "RawDevExposureBiasValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0101, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0102, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, 1, 0, 0, 0x0103, "RawDevGrayPoint", &stdInterpreter}, - {0, 1, 0, 0, 0x0104, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, 1, 0, 0, 0x0105, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, 1, 0, 0, 0x0106, "RawDevContrastValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0107, "RawDevSharpnessValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0108, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, 1, 0, 0, 0x0109, "RawDevEngine", &olDevEngineInterpreter}, - {0, 1, 0, 0, 0x010a, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, 1, 0, 0, 0x010b, "RawDevEditStatus", &stdInterpreter}, - {0, 1, 0, 0, 0x010c, "RawDevSettings", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib olyRawDevelopment2Attribs[] = { - {0, 1, 0, 0, 0x0000, "RawDevVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0100, "RawDevExposureBiasValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0101, "RawDevWhiteBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x0102, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0103, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, 1, 0, 0, 0x0104, "RawDevGrayPoint", &stdInterpreter}, - {0, 1, 0, 0, 0x0105, "RawDevContrastValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0106, "RawDevSharpnessValue", &stdInterpreter}, - {0, 1, 0, 0, 0x0107, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, 1, 0, 0, 0x0108, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, 1, 0, 0, 0x0109, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, 1, 0, 0, 0x010a, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, 1, 0, 0, 0x010b, "RawDevEngine", &olDevEngineInterpreter}, - {0, 1, 0, 0, 0x010c, "RawDevPictureMode", &olPictureModeInterpreter}, - {0, 1, 0, 0, 0x010d, "RawDevPMSaturation", &stdInterpreter}, - {0, 1, 0, 0, 0x010e, "RawDevPMContrast", &stdInterpreter}, - {0, 1, 0, 0, 0x010f, "RawDevPMSharpness", &stdInterpreter}, - {0, 1, 0, 0, 0x0110, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, - {0, 1, 0, 0, 0x0111, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, - {0, 1, 0, 0, 0x0112, "RawDevGradation", &stdInterpreter}, - {0, 1, 0, 0, 0x0113, "RawDevSaturation3", &stdInterpreter}, - {0, 1, 0, 0, 0x0119, "RawDevAutoGradation", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0120, "RawDevPMNoiseFilter", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, 0, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, 0, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib olyCameraSettingsAttribs[] = { - {0, 1, 0, 0, 0x0000, "CameraSettingsVersion", &stdInterpreter}, - {1, 1, 0, 0, 0x0100, "PreviewImageValid", &olYesNoInterpreter}, - {1, 1, 0, 0, 0x0101, "PreviewImageStart", &stdInterpreter}, - {1, 1, 0, 0, 0x0102, "PreviewImageLength", &stdInterpreter}, - {0, 1, 0, 0, 0x0200, "ExposureMode", &olExposureModeInterpreter}, - {0, 1, 0, 0, 0x0201, "AELock", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0202, "MeteringMode", &olMeteringModeInterpreter}, - {0, 1, 0, 0, 0x0300, "MacroMode", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0301, "FocusMode", &olFocusModeInterpreter}, - {0, 1, 0, 0, 0x0302, "FocusProcess", &stdInterpreter}, - {0, 1, 0, 0, 0x0303, "AFSearch", &stdInterpreter}, - {0, 1, 0, 0, 0x0304, "AFAreas", &stdInterpreter}, - {0, 1, 0, 0, 0x0400, "FlashMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0401, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0, 0x0500, "WhiteBalance2", &olWhitebalance2Interpreter}, - {0, 1, 0, 0, 0x0501, "WhiteBalanceTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x0502, "WhiteBalanceBracket", &stdInterpreter}, - {0, 1, 0, 0, 0x0503, "CustomSaturation", &stdInterpreter}, - {0, 1, 0, 0, 0x0504, "ModifiedSaturation", &stdInterpreter}, - {0, 1, 0, 0, 0x0505, "ContrastSetting", &stdInterpreter}, - {0, 1, 0, 0, 0x0506, "SharpnessSetting", &stdInterpreter}, - {0, 1, 0, 0, 0x0507, "ColorSpace", &olColorSpaceInterpreter}, - {0, 1, 0, 0, 0x0509, "SceneMode", &olSceneModeInterpreter}, - {0, 1, 0, 0, 0x050a, "NoiseReduction", &olNoiseReductionInterpreter}, - {0, 1, 0, 0, 0x050b, "DistortionCorrection", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x050c, "ShadingCompensation", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x050d, "CompressionFactor", &stdInterpreter}, - {0, 1, 0, 0, 0x050f, "Gradation", &stdInterpreter}, - {0, 1, 0, 0, 0x0520, "PictureMode", &olPictureModeInterpreter}, - {0, 1, 0, 0, 0x0521, "PictureModeSaturation", &stdInterpreter}, - {0, 1, 0, 0, 0x0522, "PictureModeHue", &stdInterpreter}, - {0, 1, 0, 0, 0x0523, "PictureModeContrast", &stdInterpreter}, - {0, 1, 0, 0, 0x0524, "PictureModeSharpness", &stdInterpreter}, - {0, 1, 0, 0, 0x0525, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, - {0, 1, 0, 0, 0x0526, "PictureModeTone", &olPictureModeToneInterpreter}, - {0, 1, 0, 0, 0x0527, "NoiseFilter", &olNoiseFilterInterpreter}, - {0, 1, 0, 0, 0x0600, "DriveMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0601, "PanoramaMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0603, "ImageQuality2", &olImageQuality2Interpreter}, - {0, 1, 0, 0, 0x0900, "ManometerPressure", &stdInterpreter}, - {0, 1, 0, 0, 0x0901, "ManometerReading", &stdInterpreter}, - {0, 1, 0, 0, 0x0902, "ExtendedWBDetect", &olOnOffInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, 0, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0303, AUTO, "AFSearch", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0304, AUTO, "AFAreas", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0400, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, + {0, AC_WRITE, 0, 0, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, 0, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, 0, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x050f, AUTO, "Gradation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, 0, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, 0, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, + {0, AC_WRITE, 0, 0, 0x0600, AUTO, "DriveMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, + {0, AC_WRITE, 0, 0, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib olyEquipmentAttribs[] = { - {0, 1, 0, 0, 0x0000, "EquipmentVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0100, "CameraType2", &stdInterpreter}, - {0, 1, 0, 0, 0x0101, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x0102, "InternalSerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x0103, "FocalPlaneDiagonal", &stdInterpreter}, - {0, 1, 0, 0, 0x0104, "BodyFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0201, "LensType", &olLensTypeInterpreter}, - {0, 1, 0, 0, 0x0202, "LensSerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x0204, "LensFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0205, "MaxApertureAtMinFocal", &olApertureInterpreter}, - {0, 1, 0, 0, 0x0206, "MaxApertureAtMaxFocal", &olApertureInterpreter}, - {0, 1, 0, 0, 0x0207, "MinFocalLength", &stdInterpreter}, - {0, 1, 0, 0, 0x0208, "MaxFocalLength", &stdInterpreter}, - {0, 1, 0, 0, 0x020a, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, - {0, 1, 0, 0, 0x020b, "LensProperties", &stdInterpreter}, - {0, 1, 0, 0, 0x0301, "Extender", &stdInterpreter}, - {0, 1, 0, 0, 0x0302, "ExtenderSerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x0303, "ExtenderModel", &stdInterpreter}, - {0, 1, 0, 0, 0x0304, "ExtenderFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x1000, "FlashType", &olFlashTypeInterpreter}, - {0, 1, 0, 0, 0x1001, "FlashModel", &olFlashModelInterpreter}, - {0, 1, 0, 0, 0x1002, "FlashFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x1003, "FlashSerialNumber", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0100, AUTO, "CameraType2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, 0, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, 0, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, 0, 0x020b, AUTO, "LensProperties", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0301, AUTO, "Extender", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, + {0, AC_WRITE, 0, 0, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, + {0, AC_WRITE, 0, 0, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib olympusAttribs[] = { - {0, 1, 0, 0, 0x0104, "BodyFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0200, "SpecialMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0201, "Quality", &stdInterpreter}, - {0, 1, 0, 0, 0x0202, "Macro", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0203, "BWMode", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0204, "DigitalZoom", &stdInterpreter}, - {0, 1, 0, 0, 0x0205, "FocalPlaneDiagonal", &stdInterpreter}, - {0, 1, 0, 0, 0x0206, "LensDistortionParams", &stdInterpreter}, - {0, 1, 0, 0, 0x0207, "CameraType", &stdInterpreter}, - {1, 1, 0, 0, 0x0208, "TextInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0209, "CameraID", &stdInterpreter}, - {0, 1, 0, 0, 0x020b, "EpsonImageWidth", &stdInterpreter}, - {0, 1, 0, 0, 0x020c, "EpsonImageHeight", &stdInterpreter}, - {0, 1, 0, 0, 0x020d, "EpsonSoftware", &stdInterpreter}, - {0, 2, 0, 0, 0x0280, "PreviewImage", &stdInterpreter}, - {0, 1, 0, 0, 0x0300, "PreCaptureFrames", &stdInterpreter}, - {0, 1, 0, 0, 0x0301, "WhiteBoard", &stdInterpreter}, - {0, 1, 0, 0, 0x0302, "OneTouchWB", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x0303, "WhiteBalanceBracket", &stdInterpreter}, - {0, 1, 0, 0, 0x0304, "WhiteBalanceBias", &stdInterpreter}, - {0, 1, 0, 0, 0x0403, "SceneMode", &stdInterpreter}, - {0, 1, 0, 0, 0x0404, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x0405, "Firmware", &stdInterpreter}, - {1, 1, 0, 0, 0x0e00, "PrintIM", &stdInterpreter}, - {0, 1, 0, 0, 0x0f00, "DataDump", &stdInterpreter}, - {0, 1, 0, 0, 0x0f01, "DataDump2", &stdInterpreter}, - {0, 1, 0, 0, 0x1000, "ShutterSpeedValue", &stdInterpreter}, - {0, 1, 0, 0, 0x1001, "ISOValue", &stdInterpreter}, - {0, 1, 0, 0, 0x1002, "ApertureValue", &stdInterpreter}, - {0, 1, 0, 0, 0x1003, "BrightnessValue", &stdInterpreter}, - {0, 1, 0, 0, 0x1004, "FlashMode", &stdInterpreter}, - {0, 1, 0, 0, 0x1005, "FlashDevice", &stdInterpreter}, - {0, 1, 0, 0, 0x1006, "ExposureCompensation", &stdInterpreter}, - {0, 1, 0, 0, 0x1007, "SensorTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x1008, "LensTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x1009, "LightCondition", &stdInterpreter}, - {0, 1, 0, 0, 0x100a, "FocusRange", &stdInterpreter}, - {0, 1, 0, 0, 0x100b, "FocusMode", &stdInterpreter}, - {0, 1, 0, 0, 0x100c, "ManualFocusDistance", &stdInterpreter}, - {0, 1, 0, 0, 0x100d, "ZoomStepCount", &stdInterpreter}, - {0, 1, 0, 0, 0x100e, "FocusStepCount", &stdInterpreter}, - {0, 1, 0, 0, 0x100f, "Sharpness", &stdInterpreter}, - {0, 1, 0, 0, 0x1010, "FlashChargeLevel", &stdInterpreter}, - {0, 1, 0, 0, 0x1011, "ColorMatrix", &stdInterpreter}, - {0, 1, 0, 0, 0x1012, "BlackLevel", &stdInterpreter}, - {0, 1, 0, 0, 0x1013, "ColorTemperatureBG", &stdInterpreter}, - {0, 1, 0, 0, 0x1014, "ColorTemperatureRG", &stdInterpreter}, - {0, 1, 0, 0, 0x1015, "WBMode", &stdInterpreter}, - {0, 1, 0, 0, 0x1017, "RedBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x1018, "BlueBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x1019, "ColorMatrixNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x101a, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x101b, "ExternalFlashAE1_0", &stdInterpreter}, - {0, 1, 0, 0, 0x101c, "ExternalFlashAE2_0", &stdInterpreter}, - {0, 1, 0, 0, 0x101d, "InternalFlashAE1_0", &stdInterpreter}, - {0, 1, 0, 0, 0x101e, "InternalFlashAE2_0", &stdInterpreter}, - {0, 1, 0, 0, 0x101f, "ExternalFlashAE1", &stdInterpreter}, - {0, 1, 0, 0, 0x1020, "ExternalFlashAE2", &stdInterpreter}, - {0, 1, 0, 0, 0x1021, "InternalFlashAE1", &stdInterpreter}, - {0, 1, 0, 0, 0x1022, "InternalFlashAE2", &stdInterpreter}, - {0, 1, 0, 0, 0x1023, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0, 0x1024, "InternalFlashTable", &stdInterpreter}, - {0, 1, 0, 0, 0x1025, "ExternalFlashGValue", &stdInterpreter}, - {0, 1, 0, 0, 0x1026, "ExternalFlashBounce", &olYesNoInterpreter}, - {0, 1, 0, 0, 0x1027, "ExternalFlashZoom", &stdInterpreter}, - {0, 1, 0, 0, 0x1028, "ExternalFlashMode", &stdInterpreter}, - {0, 1, 0, 0, 0x1029, "Contrast", &stdInterpreter}, - {0, 1, 0, 0, 0x102a, "SharpnessFactor", &stdInterpreter}, - {0, 1, 0, 0, 0x102b, "ColorControl", &stdInterpreter}, - {0, 1, 0, 0, 0x102c, "ValidBits", &stdInterpreter}, - {0, 1, 0, 0, 0x102d, "CoringFilter", &stdInterpreter}, - {0, 1, 0, 0, 0x102e, "OlympusImageWidth", &stdInterpreter}, - {0, 1, 0, 0, 0x102f, "OlympusImageHeight", &stdInterpreter}, - {0, 1, 0, 0, 0x1030, "SceneDetect", &stdInterpreter}, - {0, 1, 0, 0, 0x1031, "SceneArea", &stdInterpreter}, - {0, 1, 0, 0, 0x1033, "SceneDetectData", &stdInterpreter}, - {0, 1, 0, 0, 0x1034, "CompressionRatio", &stdInterpreter}, - {1, 1, 0, 0, 0x1035, "PreviewImageValid", &olYesNoInterpreter}, - {1, 1, 0, 0, 0x1036, "PreviewImageStart", &stdInterpreter}, - {1, 1, 0, 0, 0x1037, "PreviewImageLength", &stdInterpreter}, - {0, 1, 0, 0, 0x1038, "AFResult", &stdInterpreter}, - {0, 1, 0, 0, 0x1039, "CCDScanMode", &stdInterpreter}, - {0, 1, 0, 0, 0x103a, "NoiseReduction", &olOnOffInterpreter}, - {0, 1, 0, 0, 0x103b, "InfinityLensStep", &stdInterpreter}, - {0, 1, 0, 0, 0x103c, "NearLensStep", &stdInterpreter}, - {0, 1, 0, 0, 0x103d, "LightValueCenter", &stdInterpreter}, - {0, 1, 0, 0, 0x103e, "LightValuePeriphery", &stdInterpreter}, - {0, 1, 0, 0, 0x103f, "FieldCount", &stdInterpreter}, - {0, 1, 0, olyEquipmentAttribs, 0x2010, "Equipment", &stdInterpreter}, - {0, 1, 0, olyCameraSettingsAttribs, 0x2020, "CameraSettings", &stdInterpreter}, - {0, 1, 0, olyRawDevelopmentAttribs, 0x2030, "RawDevelopment", &stdInterpreter}, - {0, 1, 0, olyRawDevelopment2Attribs, 0x2031, "RawDev2", &stdInterpreter}, - {0, 1, 0, olyImageProcessingAttribs, 0x2040, "ImageProcessing", &stdInterpreter}, - {0, 1, 0, olyFocusInfoAttribs, 0x2050, "FocusInfo", &stdInterpreter}, - {1, 1, 0, 0, 0x2100, "Olympus2100", &stdInterpreter}, - {1, 1, 0, 0, 0x2300, "Olympus2300", &stdInterpreter}, - {1, 1, 0, 0, 0x2400, "Olympus2400", &stdInterpreter}, - {1, 1, 0, 0, 0x2500, "Olympus2500", &stdInterpreter}, - {1, 1, 0, 0, 0x2600, "Olympus2600", &stdInterpreter}, - {1, 1, 0, 0, 0x2700, "Olympus2700", &stdInterpreter}, - {1, 1, 0, 0, 0x2800, "Olympus2800", &stdInterpreter}, - {1, 1, 0, 0, 0x2900, "Olympus2900", &stdInterpreter}, - {0, 1, 0, 0, 0x3000, "RawInfo", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0201, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0207, AUTO, "CameraType", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0208, AUTO, "TextInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0209, AUTO, "CameraID", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0403, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0405, AUTO, "Firmware", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1001, AUTO, "ISOValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1004, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1009, AUTO, "LightCondition", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100a, AUTO, "FocusRange", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100b, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x100f, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1015, AUTO, "WBMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1017, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, + {0, AC_WRITE, 0, 0, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1029, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x102b, AUTO, "ColorControl", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x102c, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1031, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, 0, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1038, AUTO, "AFResult", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x103f, AUTO, "FieldCount", &stdInterpreter}, + {0, AC_WRITE, 0, olyEquipmentAttribs, 0x2010, AUTO, "Equipment", &stdInterpreter}, + {0, AC_WRITE, 0, olyCameraSettingsAttribs, 0x2020, AUTO, "CameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, olyRawDevelopmentAttribs, 0x2030, AUTO, "RawDevelopment", &stdInterpreter}, + {0, AC_WRITE, 0, olyRawDevelopment2Attribs, 0x2031, AUTO, "RawDev2", &stdInterpreter}, + {0, AC_WRITE, 0, olyImageProcessingAttribs, 0x2040, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, olyFocusInfoAttribs, 0x2050, AUTO, "FocusInfo", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x3000, AUTO, "RawInfo", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; } #endif diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index 1abb90c9a..1d23998ee 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -21,6 +21,7 @@ #include #include +#include /* memcpy() */ #include #include @@ -204,9 +205,27 @@ class PAISOInterpreter : public ChoiceInterpreter { choices[19] = "2000"; choices[20] = "2500"; choices[21] = "3200"; + choices[22] = "4000"; + choices[23] = "5000"; + choices[24] = "6400"; + choices[25] = "8000"; + choices[26] = "10000"; + choices[27] = "12800"; + choices[28] = "16000"; + choices[29] = "20000"; + choices[30] = "25600"; + choices[31] = "32000"; + choices[32] = "40000"; + choices[33] = "51200"; + choices[50] = "50"; choices[100] = "100"; choices[200] = "200"; + /*choices[400] = "400"; + choices[800] = "800"; + choices[1600] = "1600"; + choices[3200] = "3200"; Moved to tail for sorting reasons */ + choices[258] = "50"; choices[259] = "70"; choices[260] = "100"; @@ -220,10 +239,22 @@ class PAISOInterpreter : public ChoiceInterpreter { choices[268] = "1600"; choices[269] = "2200"; choices[270] = "3200"; + choices[271] = "4500"; + choices[272] = "6400"; + choices[273] = "9000"; + choices[274] = "12800"; + choices[275] = "18000"; + choices[276] = "25600"; + choices[277] = "36000"; + choices[278] = "51200"; + choices[400] = "400"; choices[800] = "800"; choices[1600] = "1600"; choices[3200] = "3200"; + + //choices[65534] = "Auto"; ?? + //choices[65535] = "Auto"; ?? } }; PAISOInterpreter paISOInterpreter; @@ -448,10 +479,10 @@ PAColorSpaceInterpreter paColorSpaceInterpreter; class PALensTypeInterpreter : public IntLensInterpreter< int > { public: - PALensTypeInterpreter () { - choices.insert(p_t( 0,"M-42 or No Lens")); - choices.insert(p_t(256*1, "K,M Lens")); - choices.insert(p_t(256*2, "A Series Lens")); + PALensTypeInterpreter () { // From EXIFTOOL database 'Pentax.pm' V2.65 + choices.insert(p_t( 0+ 0, "M-42 or No Lens")); + choices.insert(p_t(256*1+ 0, "K,M Lens")); + choices.insert(p_t(256*2+ 0, "A Series Lens")); choices.insert(p_t(256*3+ 0, "Sigma Lens")); choices.insert(p_t(256*3+ 17, "smc PENTAX-FA SOFT 85mm f/2.8")); choices.insert(p_t(256*3+ 18, "smc PENTAX-F 1.7X AF ADAPTER")); @@ -466,14 +497,14 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*3+ 25, "smc PENTAX-F 35-105mm f/4-5.6")); choices.insert(p_t(256*3+ 25, "Sigma AF 28-300mm f/3.5-5.6 DL IF")); choices.insert(p_t(256*3+ 25, "Sigma 55-200mm f/4-5.6 DC")); - choices.insert(p_t(256*3+ 25, "Sigma AF 28-300mm f/3.5-5.6 DL IF")); choices.insert(p_t(256*3+ 25, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro")); choices.insert(p_t(256*3+ 25, "Tokina 80-200mm f/2.8 ATX-Pro")); choices.insert(p_t(256*3+ 26, "smc PENTAX-F* 250-600mm f/5.6 ED[IF]")); choices.insert(p_t(256*3+ 27, "smc PENTAX-F 28-80mm f/3.5-4.5")); - choices.insert(p_t(256*3+ 27, "Tokina AT-X PRO AF 28-70mm f/2.6-2.8")); + choices.insert(p_t(256*3+ 27, "Tokina AT-X Pro AF 28-70mm f/2.6-2.8")); choices.insert(p_t(256*3+ 28, "smc PENTAX-F 35-70mm f/3.5-4.5")); choices.insert(p_t(256*3+ 28, "Tokina 19-35mm f/3.5-4.5 AF")); + choices.insert(p_t(256*3+ 28, "Tokina AT-X AF 400mm f/5.6")); choices.insert(p_t(256*3+ 29, "PENTAX-F 28-80mm f/3.5-4.5")); choices.insert(p_t(256*3+ 29, "Sigma AF 18-125mm f/3.5-5.6 DC")); choices.insert(p_t(256*3+ 29, "Tokina AT-X PRO 28-70mm f/2.6-2.8")); @@ -485,21 +516,22 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*3+ 33, "smc PENTAX-F 50mm f/1.7")); choices.insert(p_t(256*3+ 34, "smc PENTAX-F 135mm f/2.8 [IF]")); choices.insert(p_t(256*3+ 35, "smc PENTAX-F 28mm f/2.8")); - choices.insert(p_t(256*3+ 36, "Sigma 20mm f/1.8 EX DG ASPHERICAL RF")); + choices.insert(p_t(256*3+ 36, "Sigma 20mm f/1.8 EX DG Aspherical RF")); choices.insert(p_t(256*3+ 38, "smc PENTAX-F* 300mm f/4.5 ED[IF]")); choices.insert(p_t(256*3+ 39, "smc PENTAX-F* 600mm f/4 ED[IF]")); - choices.insert(p_t(256*3+ 40, "smc PENTAX-F MACRO 100mm f/2.8")); - choices.insert(p_t(256*3+ 41, "smc PENTAX-F MACRO 50mm f/2.8")); + choices.insert(p_t(256*3+ 40, "smc PENTAX-F Macro 100mm f/2.8")); + choices.insert(p_t(256*3+ 41, "smc PENTAX-F Macro 50mm f/2.8")); choices.insert(p_t(256*3+ 41, "Sigma 50mm f/2.8 Macro")); choices.insert(p_t(256*3+ 44, "Sigma AF 10-20mm f/4-5.6 EX DC")); - choices.insert(p_t(256*3+ 44, "Sigma 12-24mm f/4.5 EX DG")); + choices.insert(p_t(256*3+ 44, "Sigma 12-24mm f/4.5-5.6 EX DG")); choices.insert(p_t(256*3+ 44, "Sigma 17-70mm f/2.8-4.5 DC Macro")); choices.insert(p_t(256*3+ 44, "Sigma 18-50mm f/3.5-5.6 DC")); choices.insert(p_t(256*3+ 44, "Tamron 35-90mm f/4 AF")); choices.insert(p_t(256*3+ 46, "Sigma APO 70-200mm f/2.8 EX")); choices.insert(p_t(256*3+ 46, "Sigma EX APO 100-300mm f/4 IF")); - choices.insert(p_t(256*3+ 50, "smc PENTAX-FA 28-70 f/4 AL")); - choices.insert(p_t(256*3+ 51, "Sigma 28mm f/1.8 EX DG ASPHERICAL MACRO")); + choices.insert(p_t(256*3+ 46, "Samsung/Schneider D-XENON 50-200mm f/4-5.6 ED")); + choices.insert(p_t(256*3+ 50, "smc PENTAX-FA 28-70mm f/4 AL")); + choices.insert(p_t(256*3+ 51, "Sigma 28mm f/1.8 EX DG Aspherical Macro")); choices.insert(p_t(256*3+ 52, "smc PENTAX-FA 28-200mm f/3.8-5.6 AL[IF]")); choices.insert(p_t(256*3+ 52, "Tamron AF LD 28-200mm f/3.8-5.6 [IF] Aspherical (171D)")); choices.insert(p_t(256*3+ 53, "smc PENTAX-FA 28-80mm f/3.5-5.6 AL")); @@ -510,15 +542,15 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*3+ 252,"smc PENTAX-DA 18-55mm f/3.5-5.6 AL")); choices.insert(p_t(256*3+ 253,"smc PENTAX-DA 14mm f/2.8 ED[IF]")); choices.insert(p_t(256*3+ 254,"smc PENTAX-DA 16-45mm f/4 ED AL")); - choices.insert(p_t(256*3+ 255, "Sigma 18-200mm f/3.5-6.3 DC")); - choices.insert(p_t(256*3+ 255, "Sigma DL-II 35-80mm f/4-5.6")); - choices.insert(p_t(256*3+ 255, "Sigma DL Zoom 75-300mm f/4-5.6")); - choices.insert(p_t(256*3+ 255, "Sigma DF EX Aspherical 28-70mm f/2.8")); - choices.insert(p_t(256*3+ 255, "Sigma AF Tele 400mm f/5.6 Multi-coated")); - choices.insert(p_t(256*3+ 255, "Sigma 24-60mm f/2.8 EX DG")); - choices.insert(p_t(256*3+ 255, "Sigma 70-300mm f/4-5.6 Macro")); - choices.insert(p_t(256*3+ 255, "Sigma 55-200mm f/4-5.6 DC")); - choices.insert(p_t(256*3+ 255, "Sigma 18-50mm f/2.8 EX DC")); + choices.insert(p_t(256*3+ 255,"Sigma 18-200mm f/3.5-6.3 DC")); + choices.insert(p_t(256*3+ 255,"Sigma DL-II 35-80mm f/4-5.6")); + choices.insert(p_t(256*3+ 255,"Sigma DL Zoom 75-300mm f/4-5.6")); + choices.insert(p_t(256*3+ 255,"Sigma DF EX Aspherical 28-70mm f/2.8")); + choices.insert(p_t(256*3+ 255,"Sigma AF Tele 400mm f/5.6 Multi-coated")); + choices.insert(p_t(256*3+ 255,"Sigma 24-60mm f/2.8 EX DG")); + choices.insert(p_t(256*3+ 255,"Sigma 70-300mm f/4-5.6 Macro")); + choices.insert(p_t(256*3+ 255,"Sigma 55-200mm f/4-5.6 DC")); + choices.insert(p_t(256*3+ 255,"Sigma 18-50mm f/2.8 EX DC")); choices.insert(p_t(256*4+ 1, "smc PENTAX-FA SOFT 28mm f/2.8")); choices.insert(p_t(256*4+ 2, "smc PENTAX-FA 80-320mm f/4.5-5.6")); choices.insert(p_t(256*4+ 3, "smc PENTAX-FA 43mm f/1.9 Limited")); @@ -529,22 +561,22 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*4+ 19, "Tamron SP AF 90mm f/2.8 (172E)")); choices.insert(p_t(256*4+ 20, "smc PENTAX-FA 28-80mm f/3.5-5.6")); choices.insert(p_t(256*4+ 21, "Cosina AF 100-300mm f/5.6-6.7")); - choices.insert(p_t(256*4+ 22, "TOKINA 28-80mm f/3.5-5.6")); + choices.insert(p_t(256*4+ 22, "Tokina 28-80mm f/3.5-5.6")); choices.insert(p_t(256*4+ 23, "smc PENTAX-FA 20-35mm f/4 AL")); choices.insert(p_t(256*4+ 24, "smc PENTAX-FA 77mm f/1.8 Limited")); choices.insert(p_t(256*4+ 25, "Tamron SP AF 14mm f/2.8")); - choices.insert(p_t(256*4+ 26, "smc PENTAX-FA MACRO 100mm f/3.5")); + choices.insert(p_t(256*4+ 26, "smc PENTAX-FA Macro 100mm f/3.5")); choices.insert(p_t(256*4+ 26, "Cosina 100mm f/3.5 Macro")); - choices.insert(p_t(256*4+ 27, "Tamron AF 28-300mm f/3.5-6.3 LD Aspherical[IF] MACRO (285D)")); + choices.insert(p_t(256*4+ 27, "Tamron AF 28-300mm f/3.5-6.3 LD Aspherical[IF] Macro (185D/285D)")); choices.insert(p_t(256*4+ 28, "smc PENTAX-FA 35mm f/2 AL")); - choices.insert(p_t(256*4+ 29, "Tamron AF 28-200mm f/3.8-5.6 LD Super II MACRO (371D)")); + choices.insert(p_t(256*4+ 29, "Tamron AF 28-200mm f/3.8-5.6 LD Super II Macro (371D)")); choices.insert(p_t(256*4+ 34, "smc PENTAX-FA 24-90mm f/3.5-4.5 AL[IF]")); choices.insert(p_t(256*4+ 35, "smc PENTAX-FA 100-300mm f/4.7-5.8")); - choices.insert(p_t(256*4+ 36, "Tamron AF 70-300mm f/4-5.6 LD MACRO")); + choices.insert(p_t(256*4+ 36, "Tamron AF70-300mm f/4-5.6 LD Macro")); choices.insert(p_t(256*4+ 37, "Tamron SP AF 24-135mm f/3.5-5.6 AD AL (190D)")); choices.insert(p_t(256*4+ 38, "smc PENTAX-FA 28-105mm f/3.2-4.5 AL[IF]")); choices.insert(p_t(256*4+ 39, "smc PENTAX-FA 31mm f/1.8 AL Limited")); - choices.insert(p_t(256*4+ 41, "Tamron AF 28-200mm Super Zoom f/3.8-5.6 Aspherical XR [IF] MACRO (A03)")); + choices.insert(p_t(256*4+ 41, "Tamron AF 28-200mm Super Zoom f/3.8-5.6 Aspherical XR [IF] Macro (A03)")); choices.insert(p_t(256*4+ 43, "smc PENTAX-FA 28-90mm f/3.5-5.6")); choices.insert(p_t(256*4+ 44, "smc PENTAX-FA J 75-300mm f/4.5-5.8 AL")); choices.insert(p_t(256*4+ 45, "Tamron 28-300mm f/3.5-6.3 Ultra zoom XR")); @@ -552,18 +584,22 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*4+ 46, "smc PENTAX-FA J 28-80mm f/3.5-5.6 AL")); choices.insert(p_t(256*4+ 47, "smc PENTAX-FA J 18-35mm f/4-5.6 AL")); choices.insert(p_t(256*4+ 49, "Tamron SP AF 28-75mm f/2.8 XR Di (A09)")); - choices.insert(p_t(256*4+ 51, "smc PENTAX-D FA 50mm f/2.8 MACRO")); - choices.insert(p_t(256*4+ 52, "smc PENTAX-D FA 100mm f/2.8 MACRO")); - choices.insert(p_t(256*4+ 75, "Tamron SP AF 70-200 f/2.8 Di LD [IF] Macro (A001)")); + choices.insert(p_t(256*4+ 51, "smc PENTAX-D FA 50mm f/2.8 Macro")); + choices.insert(p_t(256*4+ 52, "smc PENTAX-D FA 100mm f/2.8 Macro")); + choices.insert(p_t(256*4+ 55, "Samsung/Schneider D-XENOGON 35mm f/2")); + choices.insert(p_t(256*4+ 56, "Samsung/Schneider D-XENON 100mm f/2.8 Macro")); + choices.insert(p_t(256*4+ 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); + choices.insert(p_t(256*4+ 214, "smc PENTAX-DA 35mm f/2.4 AL")); choices.insert(p_t(256*4+ 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); choices.insert(p_t(256*4+ 230, "Tamron SP AF 17-50mm f/2.8 XR Di II")); choices.insert(p_t(256*4+ 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); choices.insert(p_t(256*4+ 237, "Samsung/Schneider D-XENOGON 10-17mm f/3.5-4.5")); - choices.insert(p_t(256*4+ 239, "Samsung D-XENON 12-24mm f/4 ED AL [IF]")); + choices.insert(p_t(256*4+ 239, "Samsung/Schneider D-XENON 12-24mm f/4 ED AL [IF]")); + choices.insert(p_t(256*4+ 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); choices.insert(p_t(256*4+ 243, "smc PENTAX-DA 70mm f/2.4 Limited")); choices.insert(p_t(256*4+ 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); - choices.insert(p_t(256*4+ 245, "Schneider D-XENON 50-200mm")); - choices.insert(p_t(256*4+ 246, "Schneider D-XENON 18-55mm")); + choices.insert(p_t(256*4+ 245, "Samsung/Schneider D-XENON 50-200mm f/4-5.6")); + choices.insert(p_t(256*4+ 246, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6")); choices.insert(p_t(256*4+ 247, "smc PENTAX-DA 10-17mm f/3.5-4.5 ED [IF] Fisheye zoom")); choices.insert(p_t(256*4+ 248, "smc PENTAX-DA 12-24mm f/4 ED AL [IF]")); choices.insert(p_t(256*4+ 249, "Tamron 18-200mm f/3.5-6.3 XR DiII (A14)")); @@ -579,8 +615,8 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*5+ 5, "smc PENTAX-FA* 600mm f/4 ED[IF]")); choices.insert(p_t(256*5+ 6, "smc PENTAX-FA* 300mm f/4.5 ED[IF]")); choices.insert(p_t(256*5+ 7, "smc PENTAX-FA 135mm f/2.8 [IF]")); - choices.insert(p_t(256*5+ 8, "smc PENTAX-FA MACRO 50mm f/2.8")); - choices.insert(p_t(256*5+ 9, "smc PENTAX-FA MACRO 100mm f/2.8")); + choices.insert(p_t(256*5+ 8, "smc PENTAX-FA Macro 50mm f/2.8")); + choices.insert(p_t(256*5+ 9, "smc PENTAX-FA Macro 100mm f/2.8")); choices.insert(p_t(256*5+ 10, "smc PENTAX-FA* 85mm f/1.4 [IF]")); choices.insert(p_t(256*5+ 11, "smc PENTAX-FA* 200mm f/2.8 ED[IF]")); choices.insert(p_t(256*5+ 12, "smc PENTAX-FA 28-80mm f/3.5-4.7")); @@ -600,21 +636,31 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*6+ 9, "smc PENTAX-FA 20mm f/2.8")); choices.insert(p_t(256*6+ 10, "smc PENTAX-FA* 400mm f/5.6 ED[IF]")); choices.insert(p_t(256*6+ 13, "smc PENTAX-FA* 400mm f/5.6 ED[IF]")); - choices.insert(p_t(256*6+ 14, "smc PENTAX-FA* MACRO 200mm f/4 ED[IF]")); + choices.insert(p_t(256*6+ 14, "smc PENTAX-FA* Macro 200mm f/4 ED[IF]")); choices.insert(p_t(256*7+ 0, "smc PENTAX-DA 21mm f/3.2 AL Limited")); - choices.insert(p_t(256*7+ 58, "smc PENTAX-D FA MACRO 100mm f/2.8 WR")); + choices.insert(p_t(256*7+ 58, "smc PENTAX-D FA Macro 100mm f/2.8 WR")); choices.insert(p_t(256*7+ 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); + choices.insert(p_t(256*7+ 202, "smc PENTAX-DA L 18-55mm f/3.5-5.6 AL WR")); + choices.insert(p_t(256*7+ 204, "HD PENTAX-DA 15mm f/4 ED AL Limited")); + choices.insert(p_t(256*7+ 205, "HD PENTAX-DA 35mm f/2.8 Macro Limited")); + choices.insert(p_t(256*7+ 206, "HD PENTAX-DA 70mm f/2.4 Limited")); + choices.insert(p_t(256*7+ 207, "HD PENTAX-DA 21mm f/3.2 ED AL Limited")); + choices.insert(p_t(256*7+ 208, "HD PENTAX-DA 40mm f/2.8 Limited")); + choices.insert(p_t(256*7+ 212, "smc PENTAX-DA 50mm f/1.8")); + choices.insert(p_t(256*7+ 213, "smc PENTAX-DA 40mm f/2.8 XS")); choices.insert(p_t(256*7+ 214, "smc PENTAX-DA 35mm f/2.4 AL")); choices.insert(p_t(256*7+ 216, "smc PENTAX-DA L 55-300mm f/4-5.8 ED")); choices.insert(p_t(256*7+ 217, "smc PENTAX-DA 50-200mm f/4-5.6 ED WR")); choices.insert(p_t(256*7+ 218, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL WR")); choices.insert(p_t(256*7+ 220, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical [IF]")); - choices.insert(p_t(256*7+ 222, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); - choices.insert(p_t(256*7+ 223, "Samsung D-XENON 18-55mm f/3.5-5.6 II")); + choices.insert(p_t(256*7+ 221, "smc PENTAX-DA L 50-200mm f/4-5.6 ED")); + choices.insert(p_t(256*7+ 222, "smc PENTAX-DA L 18-55mm f/3.5-5.6")); + choices.insert(p_t(256*7+ 223, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6 II")); choices.insert(p_t(256*7+ 224, "smc PENTAX-DA 15mm f/4 ED AL Limited")); - choices.insert(p_t(256*7+ 225, "Samsung D-XENON 18-250mm f/3.5-6.3")); + choices.insert(p_t(256*7+ 225, "Samsung/Schneider D-XENON 18-250mm f/3.5-6.3")); choices.insert(p_t(256*7+ 226, "smc PENTAX-DA* 55mm f/1.4 SDM (SDM unused)")); - choices.insert(p_t(256*7+ 227, "smc PENTAX DA* 60-250mm f/4 [IF] SDM (SDM unused)")); + choices.insert(p_t(256*7+ 227, "smc PENTAX-DA* 60-250mm f/4 [IF] SDM (SDM unused)")); + choices.insert(p_t(256*7+ 228, "Samsung 16-45mm f/4 ED")); choices.insert(p_t(256*7+ 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); choices.insert(p_t(256*7+ 230, "Tamron AF 17-50mm f/2.8 XR Di-II LD (Model A16)")); choices.insert(p_t(256*7+ 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); @@ -622,45 +668,113 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*7+ 234, "smc PENTAX-DA* 300mm f/4 ED [IF] SDM (SDM unused)")); choices.insert(p_t(256*7+ 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM (SDM unused)")); choices.insert(p_t(256*7+ 236, "smc PENTAX-DA 55-300mm f/4-5.8 ED")); - choices.insert(p_t(256*7+ 238, "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] MACRO")); + choices.insert(p_t(256*7+ 238, "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro")); choices.insert(p_t(256*7+ 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM (SDM unused)")); choices.insert(p_t(256*7+ 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); choices.insert(p_t(256*7+ 243, "smc PENTAX-DA 70mm f/2.4 Limited")); choices.insert(p_t(256*7+ 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); - choices.insert(p_t(256*8+ 14, "Sigma 17-70mm f/2.8-4.0 DC Macro OS HSM")); + choices.insert(p_t(256*8+ 3, "Sigma AF 18-125mm f/3.5-5.6 DC")); + choices.insert(p_t(256*8+ 4, "Sigma 50mm f/1.4 EX DG HSM")); + choices.insert(p_t(256*8+ 8, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); + choices.insert(p_t(256*8+ 11, "Sigma 10-20mm f/3.5 EX DC HSM")); + choices.insert(p_t(256*8+ 12, "Sigma 70-300mm f/4-5.6 DG OS")); + choices.insert(p_t(256*8+ 13, "Sigma 120-400mm f/4.5-5.6 APO DG OS HSM")); + choices.insert(p_t(256*8+ 14, "Sigma 17-70mm f/2.8-4.0 DC Macro OS HSM")); + choices.insert(p_t(256*8+ 15, "Sigma 150-500mm f/5-6.3 APO DG OS HSM")); + choices.insert(p_t(256*8+ 16, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); + choices.insert(p_t(256*8+ 17, "Sigma 50-500mm f/4.5-6.3 DG OS HSM")); + choices.insert(p_t(256*8+ 18, "Sigma 8-16mm f/4.5-5.6 DC HSM")); + choices.insert(p_t(256*8+ 21, "Sigma 17-50mm f/2.8 EX DC OS HSM")); + choices.insert(p_t(256*8+ 22, "Sigma 85mm f/1.4 EX DG HSM")); + choices.insert(p_t(256*8+ 23, "Sigma 70-200mm f/2.8 APO EX DG OS HSM")); + choices.insert(p_t(256*8+ 27, "Sigma 18-200mm f/3.5-6.3 II DC HSM")); + choices.insert(p_t(256*8+ 28, "Sigma 18-250mm f/3.5-6.3 DC Macro HSM")); + choices.insert(p_t(256*8+ 30, "Sigma 17-70mm f/2.8-4 DC Macro HSM | C")); // "| C" stands for "Contemporary" product line + choices.insert(p_t(256*8+ 210, "smc PENTAX-DA 18-270mm f/3.5-6.3 ED SDM")); + choices.insert(p_t(256*8+ 211, "HD PENTAX-DA 560mm f/5.6 ED AW")); choices.insert(p_t(256*8+ 215, "smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL [IF] DC WR")); choices.insert(p_t(256*8+ 226, "smc PENTAX-DA* 55mm f/1.4 SDM")); - choices.insert(p_t(256*8+ 227, "smc PENTAX DA* 60-250mm f/4 [IF] SDM")); + choices.insert(p_t(256*8+ 227, "smc PENTAX-DA* 60-250mm f/4 [IF] SDM")); choices.insert(p_t(256*8+ 232, "smc PENTAX-DA 17-70mm f/4 AL [IF] SDM")); choices.insert(p_t(256*8+ 234, "smc PENTAX-DA* 300mm f/4 ED [IF] SDM")); choices.insert(p_t(256*8+ 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM")); choices.insert(p_t(256*8+ 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM")); choices.insert(p_t(256*8+ 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM")); choices.insert(p_t(256*8+ 255, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); - choices.insert(p_t(256*8+ 255, "Sigma APO 150-500mm f/5-6.3 DG OS HSM")); - choices.insert(p_t(256*11+ 4, "smc PENTAX-FA 645 45-85mm f/4.5")); - choices.insert(p_t(256*11+ 8, "smc PENTAX-FA 645 80-160mm f/4.5")); + choices.insert(p_t(256*8+ 255, "Sigma 150-500mm f/5-6.3 DG APO [OS] HSM")); + choices.insert(p_t(256*8+ 255, "Sigma 50-150mm f/2.8 II APO EX DC HSM")); + choices.insert(p_t(256*8+ 255, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye")); + choices.insert(p_t(256*8+ 255, "Sigma 50-200mm f/4-5.6 DC OS")); + choices.insert(p_t(256*8+ 255, "Sigma 24-70mm f/2.8 EX DG HSM")); + choices.insert(p_t(256*9+ 0, "645 Manual Lens")); + choices.insert(p_t(256*10+ 0, "645 A Series Lens")); + choices.insert(p_t(256*11+ 1, "smc PENTAX-FA 645 75mm f/2.8")); + choices.insert(p_t(256*11+ 2, "smc PENTAX-FA 645 45mm f/2.8")); + choices.insert(p_t(256*11+ 3, "smc PENTAX-FA* 645 300mm f/4 ED [IF]")); + choices.insert(p_t(256*11+ 4, "smc PENTAX-FA 645 45-85mm f/4.5")); + choices.insert(p_t(256*11+ 5, "smc PENTAX-FA 645 400mm f/5.6 ED [IF]")); + choices.insert(p_t(256*11+ 7, "smc PENTAX-FA 645 Macro 120mm f/4")); + choices.insert(p_t(256*11+ 8, "smc PENTAX-FA 645 80-160mm f/4.5")); + choices.insert(p_t(256*11+ 9, "smc PENTAX-FA 645 200mm f/4 [IF]")); + choices.insert(p_t(256*11+ 10, "smc PENTAX-FA 645 150mm f/2.8 [IF]")); choices.insert(p_t(256*11+ 11, "smc PENTAX-FA 645 35mm f/3.5 AL [IF]")); + choices.insert(p_t(256*11+ 12, "smc PENTAX-FA 645 300mm f/5.6 ED [IF]")); + choices.insert(p_t(256*11+ 14, "smc PENTAX-FA 645 55-110mm f/5.6")); + choices.insert(p_t(256*11+ 16, "smc PENTAX-FA 645 33-55mm f/4.5 AL")); choices.insert(p_t(256*11+ 17, "smc PENTAX-FA 645 150-300mm f/5.6 ED [IF]")); choices.insert(p_t(256*13+ 18, "smc PENTAX-D FA 645 55mm f/2.8 AL [IF] SDM AW")); + choices.insert(p_t(256*13+ 19, "smc PENTAX-D FA 645 25mm f/4 AL [IF] SDM AW")); + choices.insert(p_t(256*13+ 20, "HD PENTAX-D FA 645 90mm f/2.8 ED AW SR")); + choices.insert(p_t(256*21+ 0, "Pentax Q Manual Lens")); + choices.insert(p_t(256*21+ 1, "01 Standard Prime 8.5mm f/1.9")); + choices.insert(p_t(256*21+ 2, "02 Standard Zoom 5-15mm f/2.8-4.5")); + choices.insert(p_t(256*21+ 6, "06 Telephoto Zoom 15-45mm f/2.8")); + choices.insert(p_t(256*21+ 7, "07 Mount Shield 11.5mm f/9")); + choices.insert(p_t(256*22+ 3, "03 Fish-eye 3.2mm f/5.6")); + choices.insert(p_t(256*22+ 4, "04 Toy Lens Wide 6.3mm f/7.1")); + choices.insert(p_t(256*22+ 5, "05 Toy Lens Telephoto 18mm f/8")); } virtual std::string toString (Tag* t) { - double maxApertureAtFocal = 0; - double focalLength = 0; + double *liArray = NULL; + double maxApertureAtFocal = 0.; + double focalLength = 0.; int lensID = 256*t->toInt(0,BYTE) + t->toInt(1,BYTE); TagDirectory *root=t->getParent()->getRoot(); if (root){ - Tag *t1; - t1 = root->findTag("FocalLength"); - if( t1) - focalLength = t1->toDouble(); // Focal Length - t1 = root->findTag("MaxAperture"); - if( t1){ - int a=t1->toInt(0,BYTE)&0x7F; - maxApertureAtFocal = pow(2.0, (a-1)/32.0) ; // MaxApertureValue at focal Length - } + + Tag *t1; + t1 = root->findTag("FocalLength"); // Should get tag 0x920A (rational64u) from the standard Exif tag list + if( t1) + focalLength = t1->toDouble(); // Focal Length + + t1 = root->findTag("MaxAperture"); + if(t1){ + double maxAperture = t1->toDouble(); // MaxApertureValue at focal Length + if (maxAperture != 0.) + maxApertureAtFocal = maxAperture; + else { + t1 = root->findTag("NominalMaxAperture"); + if(t1) + maxApertureAtFocal = t1->toDouble(); + } + } + + t1 = root->getTagP("LensInfo"); + if(t1) + liArray = t1->toDoubleArray(); + + // Focal length below 10mm are set to 0 by the camera in the standard Exif tag, so we'll look into the makernotes + // This value will have decimals, which reflects more precision... or imprecision, due to the packed form of this value, who knows? + if (focalLength == 0.) { + rtexif::TagDirectory* mnote = root->findTag("MakerNote")->getDirectory(); + rtexif::Tag* flt=mnote->getTagP("LensInfo/FocalLength"); + if (flt) + focalLength = flt->toDouble (); + else if ((flt = mnote->getTagP ("FocalLength"))) + focalLength = flt->toDouble(); + } } - return guess( lensID, focalLength, maxApertureAtFocal); + return guess( lensID, focalLength, maxApertureAtFocal, liArray); } }; PALensTypeInterpreter paLensTypeInterpreter; @@ -703,6 +817,84 @@ public: }; PAPowerSourceInterpreter paPowerSourceInterpreter; +class PALensModelQInterpreter: public Interpreter { +public: + PALensModelQInterpreter(){} + virtual std::string toString (Tag* t){ + char buffer[31]; + buffer[0] = 0; // + return buffer; // TODO: how to get the string content!? + + // normal path below (copy the content of the string), but has to be bug fixed + memcpy(buffer, t->getValue(), 30); + buffer[30] = 0; + return buffer; + } +}; +PALensModelQInterpreter paLensModelQInterpreter; + +class PALensInfoQInterpreter: public Interpreter { +public: + PALensInfoQInterpreter(){} + virtual std::string toString (Tag* t){ + char buffer[21]; + buffer[0] = 0; + return buffer; // TODO: how to get the string content!? + + // normal path below (copy the content of the string), but has to be bug fixed + memcpy(buffer, t->getValue(), 20); + buffer[20] = 0; + return buffer; + } +}; +PALensInfoQInterpreter paLensInfoQInterpreter; + +class PAFocalLengthInterpreter: public Interpreter { +public: + PAFocalLengthInterpreter(){} + virtual std::string toString (Tag* t){ + double a = double(t->toInt(0,LONG)); + if(a>1.){ + char buffer[10]; + sprintf (buffer, "%.2f", a/100. ); + return buffer; + }else + return "n/a"; + } + virtual double toDouble (Tag* t, int ofs){ + double a = double(t->toInt(0,LONG)); + if(a>1.) + return a/100.; + else + return 0.; + } +}; +PAFocalLengthInterpreter paFocalLengthInterpreter; + +class PALensDataFocalLengthInterpreter: public Interpreter { +public: + PALensDataFocalLengthInterpreter(){} + virtual std::string toString (Tag* t){ + int a = t->toInt(0,BYTE); + float b = float(10*int(a>>2)) * pow(4.f, float(int(a&0x03)-2)); + if(b>1.f){ + char buffer[10]; + sprintf (buffer, "%.2f", b ); + return buffer; + }else + return "n/a"; + } + virtual double toDouble (Tag* t, int ofs){ + int a = t->toInt(ofs,BYTE); + float b = float(10*int(a>>2)) * pow(4.f, float(int(a&0x03)-2)); + if(b>1.f) + return b; + else + return 0.; + } +}; +PALensDataFocalLengthInterpreter paLensDataFocalLengthInterpreter; + class PAMaxApertureInterpreter: public Interpreter { public: PAMaxApertureInterpreter(){} @@ -718,23 +910,50 @@ class PAMaxApertureInterpreter: public Interpreter { }else return "n/a"; } + virtual double toDouble (Tag* t, int ofs){ + int a = t->toInt(0,BYTE); + a &= 0x7F; + if(a>1) + return pow(2.0, double(a-1)/32.0); + else + return 0.; + } }; PAMaxApertureInterpreter paMaxApertureInterpreter; -class PANominalMinMaxApertureInterpreter: public Interpreter { +class PANominalMinApertureInterpreter: public Interpreter { public: - PANominalMinMaxApertureInterpreter(){} + PANominalMinApertureInterpreter(){} virtual std::string toString (Tag* t){ - char buffer[1024]; - int a = t->toInt(0,BYTE); - int mina = a & 0x0F; - int maxa = (a & 0xF0)>>4; - sprintf (buffer, "%.1f - %.0f", pow(2.0, maxa/4.0), pow(2.0, (mina+10)/4.0)); + char buffer[32]; + int a = t->toInt(0,BYTE); + int mina = a & 0x0F; + sprintf (buffer, "%.1f", double(int(pow(2.0, double(mina+10)/4.0)+0.2))); return buffer; - + } + virtual double toDouble (Tag* t, int ofs){ + int a = t->toInt(0,BYTE) & 0x0F; + return double(int(pow(2.0, double(a+10)/4.0)+0.2)); } }; -PANominalMinMaxApertureInterpreter paNominalMinMaxApertureInterpreter; +PANominalMinApertureInterpreter paNominalMinApertureInterpreter; + +class PANominalMaxApertureInterpreter: public Interpreter { +public: + PANominalMaxApertureInterpreter(){} + virtual std::string toString (Tag* t){ + char buffer[32]; + int a = t->toInt(0,BYTE); + int maxa = (a & 0xF0)>>4; + sprintf (buffer, "%.1f", double(int(pow(2.0, double(maxa)/4.0)+0.2)) ); + return buffer; + } + virtual double toDouble (Tag* t, int ofs){ + int a = ( t->toInt(0,BYTE) & 0xF0)>>4; + return double(int(pow(2.0, double(a)/4.0)+0.2)); + } +}; +PANominalMaxApertureInterpreter paNominalMaxApertureInterpreter; class PAFlashStatusInterpreter: public ChoiceInterpreter { public: @@ -1037,167 +1256,175 @@ public: PADriveMode2Interpreter paDriveMode2Interpreter; const TagAttrib pentaxAttribs[] = { - {0, 1, 0, 0, 0x0000, "PentaxVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0001, "PentaxModelType", &stdInterpreter}, - {0, 2, 0, 0, 0x0002, "PreviewImageSize", &stdInterpreter}, - {0, 2, 0, 0, 0x0003, "PreviewImageLength", &stdInterpreter}, - {0, 2, 0, 0, 0x0004, "PreviewImageStart", &stdInterpreter}, - {0, 1, 0, 0, 0x0005, "PentaxModelID", &stdInterpreter}, - {0, 1, 0, 0, 0x0006, "Date", &stdInterpreter}, - {0, 1, 0, 0, 0x0007, "Time", &stdInterpreter}, - {0, 1, 0, 0, 0x0008, "Quality", &paQualityInterpreter}, - {0, 1, 0, 0, 0x0009, "PentaxImageSize", &stdInterpreter}, - {0, 1, 0, 0, 0x000b, "PictureMode", &paPictureModeInterpreter}, - {0, 1, 0, 0, 0x000c, "FlashMode", &paFlashModeInterpreter}, - {0, 1, 0, 0, 0x000d, "FocusMode", &paFocusModeInterpreter}, - {0, 1, 0, 0, 0x000e, "AFPointSelected", &paAFPointInterpreter}, - {0, 1, 0, 0, 0x000f, "AFPointsInFocus", &paAFFocusInterpreter}, - {0, 1, 0, 0, 0x0010, "FocusPosition", &stdInterpreter}, - {0, 1, 0, 0, 0x0012, "ExposureTime", &stdInterpreter}, - {0, 1, 0, 0, 0x0013, "FNumber", &paFNumberInterpreter}, - {0, 1, 0, 0, 0x0014, "ISO", &paISOInterpreter}, - {0, 1, 0, 0, 0x0015, "LightReading", &stdInterpreter}, - {0, 1, 0, 0, 0x0016, "ExposureCompensation", &stdInterpreter}, - {0, 1, 0, 0, 0x0017, "MeteringMode", &paMeteringModeInterpreter}, - {0, 1, 0, 0, 0x0018, "AutoBracketing", &stdInterpreter}, - {0, 1, 0, 0, 0x0019, "WhiteBalance", &paWhiteBalanceInterpreter}, - {0, 1, 0, 0, 0x001a, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, - {0, 1, 0, 0, 0x001b, "BlueBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x001c, "RedBalance", &stdInterpreter}, - {0, 1, 0, 0, 0x001d, "FocalLength", &stdInterpreter}, - {0, 1, 0, 0, 0x001e, "DigitalZoom", &stdInterpreter}, - {0, 1, 0, 0, 0x001f, "Saturation", &paSaturationInterpreter}, - {0, 1, 0, 0, 0x0020, "Contrast", &paContrastInterpreter}, - {0, 1, 0, 0, 0x0021, "Sharpness", &paSharpnessInterpreter}, - {0, 1, 0, 0, 0x0022, "WorldTimeLocation", &stdInterpreter}, - {0, 1, 0, 0, 0x0023, "HometownCity", &stdInterpreter}, - {0, 3, 0, 0, 0x0024, "DestinationCity", &stdInterpreter}, - {0, 3, 0, 0, 0x0025, "HometownDST", &stdInterpreter}, - {0, 1, 0, 0, 0x0026, "DestinationDST", &stdInterpreter}, - {0, 1, 0, 0, 0x0027, "DSPFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0028, "CPUFirmwareVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0029, "FrameNumber", &stdInterpreter}, - {0, 1, 0, 0, 0x002d, "EffectiveLV", &stdInterpreter}, - {0, 1, 0, 0, 0x0032, "ImageProcessing", &stdInterpreter}, - {0, 1, 0, 0, 0x0033, "PictureMode", &paPictureModeInterpreter2}, - {0, 1, 0, 0, 0x0034, "DriveMode", &paDriveModeInterpreter}, - {0, 1, 0, 0, 0x0037, "ColorSpace", &paColorSpaceInterpreter}, - {0, 1, 0, 0, 0x0038, "ImageAreaOffset", &stdInterpreter}, - {0, 1, 0, 0, 0x0039, "RawImageSize", &stdInterpreter}, - {0, 1, 0, 0, 0x003c, "AFPointsInFocus", &stdInterpreter}, - {0, 1, 0, 0, 0x003e, "PreviewImageBorders", &stdInterpreter}, - {0, 1, 0, 0, 0x003f, "LensType", &paLensTypeInterpreter}, - {0, 1, 0, 0, 0x0040, "SensitivityAdjust", &stdInterpreter}, - {0, 1, 0, 0, 0x0041, "ImageProcessingCount", &stdInterpreter}, - {0, 1, 0, 0, 0x0047, "CameraTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x0048, "AELock", &paOnOffInterpreter}, - {0, 1, 0, 0, 0x0049, "NoiseReduction", &paOnOffInterpreter}, - {0, 1, 0, 0, 0x004d, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0, 0x004f, "ImageTone", &stdInterpreter}, - {0, 1, 0, 0, 0x0050, "ColorTemperature", &stdInterpreter}, - {0, 1, 0, pentaxSRInfoAttribs, 0x005c, "ShakeReductionInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x005d, "ShutterCount", &stdInterpreter}, - {0, 1, 0, 0, 0x0069, "DynamicRangeExpansion", &paOnOffInterpreter}, - {0, 1, 0, 0, 0x0071, "HighISONoiseReduction", &paHighISONoiseInterpreter}, - {0, 1, 0, 0, 0x0072, "AFAdjustment", &stdInterpreter}, - {0, 1, 0, 0, 0x0200, "BlackPoint", &stdInterpreter}, - {0, 1, 0, 0, 0x0201, "WhitePoint", &stdInterpreter}, - {0, 1, 0, 0, 0x0203, "ColorMatrixA", &stdInterpreter}, - {0, 1, 0, 0, 0x0204, "ColorMatrixB", &stdInterpreter}, - {0, 1, 0, pentaxCameraSettingsAttribs, 0x0205, "CameraSettings", &stdInterpreter}, - {0, 1, 0, pentaxAEInfoAttribs, 0x0206, "AEInfo", &stdInterpreter}, - {0, 1, 0, pentaxLensDataAttribs, 0x0207, "LensInfo", &stdInterpreter}, - {0, 1, 0, pentaxFlashInfoAttribs, 0x0208, "FlashInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0209, "AEMeteringSegments", &stdInterpreter}, - {0, 1, 0, 0, 0x020a, "FlashADump", &stdInterpreter}, - {0, 1, 0, 0, 0x020b, "FlashBDump", &stdInterpreter}, - {0, 1, 0, 0, 0x020d, "WB_RGGBLevelsDaylight", &stdInterpreter}, - {0, 1, 0, 0, 0x020e, "WB_RGGBLevelsShade", &stdInterpreter}, - {0, 1, 0, 0, 0x020f, "WB_RGGBLevelsCloudy", &stdInterpreter}, - {0, 1, 0, 0, 0x0210, "WB_RGGBLevelsTungsten", &stdInterpreter}, - {0, 1, 0, 0, 0x0211, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, - {0, 1, 0, 0, 0x0212, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, - {0, 1, 0, 0, 0x0213, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, - {0, 1, 0, 0, 0x0214, "WB_RGGBLevelsFlash", &stdInterpreter}, - {0, 1, 0, pentaxCameraInfoAttribs, 0x0215, "CameraInfo", &stdInterpreter}, - {0, 1, 0, pentaxBatteryInfoAttribs, 0x0216, "BatteryInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x021f, "AFInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0222, "ColorInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x03fe, "DataDump", &stdInterpreter}, - {0, 1, 0, 0, 0x03ff, "UnknownInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0402, "ToneCurve", &stdInterpreter}, - {0, 1, 0, 0, 0x0403, "ToneCurves", &stdInterpreter}, - {0, 1, 0, 0, 0x0e00, "PrintIM", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Date", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0007, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Quality", &paQualityInterpreter}, + {0, AC_WRITE, 0, 0, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, + {0, AC_WRITE, 0, 0, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, + {0, AC_WRITE, 0, 0, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, + {0, AC_WRITE, 0, 0, 0x0014, AUTO, "ISO", &paISOInterpreter}, + {0, AC_WRITE, 0, 0, 0x0015, AUTO, "LightReading", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, 0, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001c, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, + {0, AC_WRITE, 0, 0, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, + {0, AC_WRITE, 0, 0, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, + {0, AC_WRITE, 0, 0, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, + {0, AC_WRITE, 0, 0, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0023, AUTO, "HometownCity", &stdInterpreter}, + {0, AC_NEW, 0, 0, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, + {0, AC_NEW, 0, 0, 0x0025, AUTO, "HometownDST", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, + {0, AC_WRITE, 0, 0, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, + {0, AC_WRITE, 0, 0, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x004d, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x004f, AUTO, "ImageTone", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxSRInfoAttribs, 0x005c, AUTO, "ShakeReductionInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, + {0, AC_WRITE, 0, 0, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxCameraSettingsAttribs, 0x0205, AUTO, "CameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxAEInfoAttribs, 0x0206, AUTO, "AEInfo", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxLensDataAttribs, 0x0207, AUTO, "LensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxFlashInfoAttribs, 0x0208, AUTO, "FlashInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020a, AUTO, "FlashADump", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxCameraInfoAttribs, 0x0215, AUTO, "CameraInfo", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxBatteryInfoAttribs, 0x0216, AUTO, "BatteryInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x021f, AUTO, "AFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, pentaxLensInfoQAttribs, 0x0239, AUTO, "LensInfoQ", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x03fe, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxSRInfoAttribs[] = { - {0, 1, 0, 0, 0, "SRResult", &paSRResultInterpreter}, - {0, 1, 0, 0, 1, "ShakeReduction", &paOnOffInterpreter}, - {0, 1, 0, 0, 2, "SRHalfPressTime", &stdInterpreter}, - {0, 1, 0, 0, 3, "SRFocalLength", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "SRFocalLength", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxLensDataAttribs[] = { - {0, 1, 0, 0, 10, "NominalMinMaxAperture", &paNominalMinMaxApertureInterpreter}, - {0, 1, 0, 0, 14, "MaxAperture", &paMaxApertureInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, + {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, + {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, + {0, AC_WRITE, 0, 0, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + +const TagAttrib pentaxLensInfoQAttribs[] = { + {0, AC_WRITE, 0, 0, 12, AUTO, "LensModel", &paLensModelQInterpreter}, + {0, AC_WRITE, 0, 0, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxCameraSettingsAttribs[] = { - {0, 1, 0, 0, 0, "PictureMode2", &paPictureMode2Interpreter}, - {0, 1, 0, 0, 1, "ProgramLine", &paProgramLineInterpreter}, - {0, 1, 0, 0, 1, "EVSteps", &paEVStepsInterpreter}, - {0, 1, 0, 0, 1, "E-DialinProgram", &paEDialinInterpreter}, - {0, 1, 0, 0, 1, "ApertureRing", &paApertureRingUseInterpreter}, - {0, 1, 0, 0, 2, "FlashOptions", &paFlashOptionInterpreter}, - {0, 1, 0, 0, 2, "MeteringMode2", &paMeteringMode2Interpreter}, - {0, 1, 0, 0, 3, "AFMode", &paAFModeInterpreter}, - {0, 1, 0, 0, 4, "AFPointSelected2", &paAFPointSelectedInterpreter}, - {0, 1, 0, 0, 7, "DriveMode2", &paDriveMode2Interpreter}, - {0, 1, 0, 0, 8, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, - {0, 1, 0, 0, 9, "BracketShotNumber", &stdInterpreter}, - {0, 1, 0, 0, 10, "WhiteBalanceSet", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "AFMode", &paAFModeInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, + {0, AC_WRITE, 0, 0, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, + {0, AC_WRITE, 0, 0, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, + {0, AC_WRITE, 0, 0, 9, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxAEInfoAttribs[] = { - {0, 1, 0, 0, 0, "AEExposureTime", &stdInterpreter}, - {0, 1, 0, 0, 1, "AEAperture", &stdInterpreter}, - {0, 1, 0, 0, 2, "AE_ISO", &stdInterpreter}, - {0, 1, 0, 0, 3, "AEXv", &stdInterpreter}, - {0, 1, 0, 0, 4, "AEBXv", &stdInterpreter}, - {0, 1, 0, 0, 5, "AEMinExposureTime", &stdInterpreter}, - {0, 1, 0, 0, 6, "AEProgramMode", &stdInterpreter}, - {0, 1, 0, 0, 9, "AEMaxAperture", &stdInterpreter}, - {0, 1, 0, 0, 10, "AEMaxAperture2", &stdInterpreter}, - {0, 1, 0, 0, 11, "AEMinAperture", &stdInterpreter}, - {0, 1, 0, 0, 12, "AEMeteringMode", &stdInterpreter}, - {0, 1, 0, 0, 14, "FlashExposureCompSet", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "AEExposureTime", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "AEAperture", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "AE_ISO", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "AEXv", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "AEBXv", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "AEMinExposureTime", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 6, AUTO, "AEProgramMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 9, AUTO, "AEMaxAperture", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 10, AUTO, "AEMaxAperture2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 11, AUTO, "AEMinAperture", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 12, AUTO, "AEMeteringMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 14, AUTO, "FlashExposureCompSet", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxFlashInfoAttribs[] = { - {0, 1, 0, 0, 0, "FlashStatus", &paFlashStatusInterpreter}, - {0, 1, 0, 0, 1, "InternalFlashMode", &paInternalFlashModeInterpreter}, - {0, 1, 0, 0, 2, "ExternalFlashMode", &paExternalFlashModeInterpreter}, - {0, 1, 0, 0, 3, "InternalFlashStrength", &stdInterpreter}, - {0, 1, 0, 0, 24, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, - {0, 1, 0, 0, 25, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, - {0, 1, 0, 0, 26, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, + {0, AC_WRITE, 0, 0, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, 0, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxBatteryInfoAttribs[] = { - {0, 1, 0, 0, 0, "PowerSource", &paPowerSourceInterpreter}, - {0, 1, 0, 0, 1, "BatteryStates", &stdInterpreter}, - {0, 1, 0, 0, 2, "BatteryADBodyNoLoad", &stdInterpreter}, - {0, 1, 0, 0, 3, "BatteryADBodyLoad", &stdInterpreter}, - {0, 1, 0, 0, 4, "BatteryADGripNoLoad", &stdInterpreter}, - {0, 1, 0, 0, 5, "BatteryADGripLoad", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "BatteryStates", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib pentaxCameraInfoAttribs[] = { - {0, 1, 0, 0, 0, "PentaxModelID", &stdInterpreter}, - {0, 1, 0, 0, 1, "ManufactureDate", &stdInterpreter}, - {0, 1, 0, 0, 2, "ProductionCode", &stdInterpreter}, - {0, 1, 0, 0, 4, "InternalSerialNumber", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "ManufactureDate", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "ProductionCode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; } #endif diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 5b8fe69d3..aae93ec2e 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -31,7 +31,7 @@ using namespace std; namespace rtexif { -StdInterpreter stdInterpreter; +Interpreter stdInterpreter; //--------------- class TagDirectory ------------------------------------------ // this class is a collection (an array) of tags @@ -45,12 +45,10 @@ TagDirectory::TagDirectory () TagDirectory::TagDirectory (TagDirectory* p, const TagAttrib* ta, ByteOrder border) : attribs(ta), order(border), parent(p) {} -TagDirectory::TagDirectory (TagDirectory* p, FILE* f, int base, const TagAttrib* ta, ByteOrder border, bool skipIgnored) { +TagDirectory::TagDirectory (TagDirectory* p, FILE* f, int base, const TagAttrib* ta, ByteOrder border, bool skipIgnored) + : attribs(ta), order(border), parent(p) +{ - attribs = ta; - order = border; - parent = p; - int numOfTags = get2 (f, order); if (numOfTags<=0 || numOfTags>200) return; @@ -106,8 +104,8 @@ void TagDirectory::sort () { } TagDirectory* TagDirectory::getRoot() { - if(parent) return parent->getRoot(); - else return this; + if(parent) return parent->getRoot(); + else return this; } const TagAttrib* TagDirectory::getAttrib (int id) { @@ -130,20 +128,49 @@ const TagAttrib* TagDirectory::getAttrib (const char* name) { return NULL; } -void TagDirectory::printAll () const { - +const TagAttrib* TagDirectory::getAttribP (const char* name) { + + if (attribs) + for (int i=0; attribs[i].ignore!=-1; i++) { + // Yeah, self made comparison! + const char *n = name; + const char *a = attribs[i].name; + while (*n && *a && *n==*a) { n++; a++; }; + if (!*a && (!*n || *n=='/')) { + // we reached the end of the subpart of name and the end of attribs->name, so they match + if (*n=='/') { + Tag* tag = getTag (attribs[i].ID); + TagDirectory *tagDir; + if (attribs[i].subdirAttribs && tag && (tagDir=tag->getDirectory())) + return tagDir->getAttribP(n+1); + else + return NULL; + } + else + return &attribs[i]; + } + } + return NULL; +} + +void TagDirectory::printAll (unsigned int level) const { + + // set the spacer prefix string + char prefixStr[level*4+1]; + unsigned int i; + for (i=0; inameToString (); if (tags[i]->isDirectory()) for (int j=0; tags[i]->getDirectory(j); j++) { - printf ("==== DIRECTORY %s[%d]: ====\n", name.c_str(), j); - tags[i]->getDirectory(j)->printAll (); - printf ("==== END OF DIRECTORY %s[%d] ====\n", name.c_str(), j); + tags[i]->getDirectory(j)->printAll (level+1); } - else { + else std::string value = tags[i]->valueToString (); - printf ("%s: %s\n", name.c_str(), value.c_str()); - } } } @@ -195,22 +222,47 @@ Tag* TagDirectory::getTag (const char* name) const { return NULL; } +Tag* TagDirectory::getTagP (const char* name) const { + + if (attribs) + for (int i=0; attribs[i].ignore!=-1; i++) { + // Yeah, self made comparison! + const char *n = name; + const char *a = attribs[i].name; + while (*n && *a && *n==*a) { n++; a++; }; + if (!*a && (!*n || *n=='/')) { + // we reached the end of the subpart of name and the end of attribs->name, so they match + if (*n=='/') { + Tag* tag = getTag (attribs[i].ID); + TagDirectory *tagDir; + if (attribs[i].subdirAttribs && tag && (tagDir=tag->getDirectory())) + return tagDir->getTagP(n+1); + else + return NULL; + } + else + return getTag (attribs[i].ID); + } + } + return NULL; +} + Tag* TagDirectory::findTag (const char* name) const { - if (attribs) { - for (int i=0; attribs[i].ignore!=-1; i++) - if (!strcmp (attribs[i].name, name)){ - Tag* t= getTag (attribs[i].ID); - if(t) return t; - else break; - } - } - for (size_t i=0; iisDirectory()){ - TagDirectory *dir = tags[i]->getDirectory(); - Tag* t=dir->findTag(name); - if(t) return t; - } - return NULL; + if (attribs) { + for (int i=0; attribs[i].ignore!=-1; i++) + if (!strcmp (attribs[i].name, name)){ + Tag* t= getTag (attribs[i].ID); + if(t) return t; + else break; + } + } + for (size_t i=0; iisDirectory()){ + TagDirectory *dir = tags[i]->getDirectory(); + Tag* t=dir->findTag(name); + if(t) return t; + } + return NULL; } // Searches a simple value, as either attribute or element @@ -395,24 +447,24 @@ TagDirectoryTable::TagDirectoryTable () TagDirectoryTable::TagDirectoryTable (TagDirectory* p, unsigned char *v,int memsize,int offs, TagType type, const TagAttrib* ta, ByteOrder border) :TagDirectory(p,ta,border),zeroOffset(offs),valuesSize(memsize),defaultType( type ) { - values = new unsigned char[valuesSize]; - memcpy(values,v,valuesSize); - for( const TagAttrib* tattr = ta; tattr->ignore != -1; tattr++){ - Tag* newTag = new Tag (this, tattr, (values + zeroOffset+ tattr->ID*getTypeSize(type)),type); - tags.push_back(newTag); // Here we can insert more tag in the same offset because of bitfield meaning - } + values = new unsigned char[valuesSize]; + memcpy(values,v,valuesSize); + for( const TagAttrib* tattr = ta; tattr->ignore != -1; tattr++){ + Tag* newTag = new Tag (this, tattr, (values + zeroOffset+ tattr->ID*getTypeSize(type)), tattr->type == AUTO ? type : tattr->type); + tags.push_back(newTag); // Here we can insert more tag in the same offset because of bitfield meaning + } } TagDirectoryTable::TagDirectoryTable (TagDirectory* p, FILE* f, int memsize,int offs, TagType type, const TagAttrib* ta, ByteOrder border) :TagDirectory(p,ta,border),zeroOffset(offs),valuesSize(memsize),defaultType( type ) { - values = new unsigned char[valuesSize]; - fread (values, 1, valuesSize, f); + values = new unsigned char[valuesSize]; + fread (values, 1, valuesSize, f); - for( const TagAttrib* tattr = ta; tattr->ignore != -1; tattr++){ - Tag* newTag = new Tag (this, tattr, (values + zeroOffset+ tattr->ID*getTypeSize(type)),type); - tags.push_back(newTag); // Here we can insert more tag in the same offset because of bitfield meaning - } + for( const TagAttrib* tattr = ta; tattr->ignore != -1; tattr++){ + Tag* newTag = new Tag (this, tattr, (values + zeroOffset+ tattr->ID*getTypeSize(type)), tattr->type == AUTO ? type : tattr->type); + tags.push_back(newTag); // Here we can insert more tag in the same offset because of bitfield meaning + } } TagDirectory* TagDirectoryTable::clone (TagDirectory* parent) { @@ -422,20 +474,20 @@ TagDirectory* TagDirectoryTable::clone (TagDirectory* parent) { TagDirectoryTable::~TagDirectoryTable() { - if(values) - delete [] values; + if(values) + delete [] values; } int TagDirectoryTable::calculateSize () { - return valuesSize; + return valuesSize; } int TagDirectoryTable::write (int start, unsigned char* buffer) { - if( values && valuesSize){ + if( values && valuesSize){ memcpy(buffer+start,values,valuesSize); return start+valuesSize; - }else - return start; + }else + return start; } //--------------- class Tag --------------------------------------------------- @@ -445,67 +497,280 @@ int TagDirectoryTable::write (int start, unsigned char* buffer) { Tag::Tag (TagDirectory* p, FILE* f, int base) : type(INVALID), count(0), value(NULL), allocOwnMemory(true), attrib(NULL), parent(p), directory(NULL) { - tag = get2 (f, getOrder()); - type = (TagType)get2 (f, getOrder()); - count = get4 (f, getOrder()); + ByteOrder order = getOrder(); - makerNoteKind = NOMK; - keep = false; + tag = get2 (f, order); + type = (TagType)get2 (f, order); + count = get4 (f, order); - // filter out invalid tags - // note the large count is to be able to pass LeafData ASCII tag which can be up to almost 10 megabytes, - // (only a small part of it will actually be parsed though) - if ((int)type<1 || (int)type>14 || count>10*1024*1024) { - type = INVALID; + makerNoteKind = NOMK; + keep = false; + + // filter out invalid tags + // note the large count is to be able to pass LeafData ASCII tag which can be up to almost 10 megabytes, + // (only a small part of it will actually be parsed though) + if ((int)type<1 || (int)type>14 || count>10*1024*1024) { + type = INVALID; + return; + } + + // store next Tag's position in file + int save = ftell(f) + 4; + + // load value field (possibly seek before) + valuesize = count * getTypeSize(type); + + if (valuesize > 4) + fseek (f, get4(f, getOrder()) + base, SEEK_SET); + + attrib = parent->getAttrib (tag); + + if (attrib && (attrib->action==AC_WRITE || attrib->action==AC_NEW)) + keep = true; + + if( tag == 0xc634 ){ // DNGPrivateData + int currPos = ftell(f); + char buffer[32],*p=buffer; + while( fread (p, 1, 1, f ) && *p != 0 && p-buffergetRoot()->findTag("Make"); + std::string make( tmake ? tmake->valueToString():""); + int save = ftell(f); + int originalOffset = sget4( (unsigned char*)&buffer[10], ( make.find("SONY") != std::string::npos ) || ( make.find("Canon") != std::string::npos ) || ( make.find("OLYMPUS") != std::string::npos ) ?MOTOROLA:bom ); + + if( !parseMakerNote(f, save - originalOffset , bom )) + type = INVALID; + } + }else if( !strncmp(buffer,"PENTAX",6) ){ + makerNoteKind = HEADERIFD; + fread (buffer, 1, 2, f); + directory = new TagDirectory*[2]; + directory[0] = new TagDirectory (parent, f, currPos, pentaxAttribs, strncmp(buffer,"MM",2)? INTEL:MOTOROLA); + directory[1] = NULL; + }else + /* SONY uses this tag to write hidden info and pointer to private encrypted tags + { + unsigned offset =sget4((unsigned char*)buffer, order); + fseek(f,offset,SEEK_SET); + makerNoteKind = TABLESUBDIR; + directory = new TagDirectory*[2]; + directory[0] = new TagDirectory (parent, f, base, sonyDNGMakerNote, order); + directory[1] = NULL; + fseek (f, save, SEEK_SET); + return; + }*/ + type = INVALID; + } + // if this tag is the makernote, it needs special treatment (brand specific parsing) + if (tag==0x927C && attrib && !strcmp (attrib->name, "MakerNote") ) { + if( !parseMakerNote(f,base,order )){ + type = INVALID; + fseek (f, save, SEEK_SET); + return; + } + } + else if (attrib && attrib->subdirAttribs) { + // Some subdirs are specific of maker and model + char make[128], model[128]; + make[0]=0; + model[0]=0; + Tag* tmake = parent->getRoot()->getTag ("Make"); + if (tmake) tmake->toString (make); + Tag* tmodel = parent->getRoot()->getTag ("Model"); + if (tmodel) tmodel->toString (model); + if (!strncmp(make, "SONY", 4)) { + switch( tag ){ + case 0x0010: + directory = new TagDirectory*[2]; + directory[1] = NULL; + if (count == 15360) + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , sonyCameraInfoAttribs, order); + else + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , sonyCameraInfo2Attribs, order); + break; + case 0x0114: + directory = new TagDirectory*[2]; + directory[1] = NULL; + if (count == 280 || count == 364) + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,SHORT , sonyCameraSettingsAttribs, MOTOROLA); + else if (count == 332) + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,SHORT , sonyCameraSettingsAttribs2, MOTOROLA); + else if(count == 1536 || count == 2048) + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , sonyCameraSettingsAttribs3, INTEL); + makerNoteKind = TABLESUBDIR; + break; + case 0x9405: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,SHORT , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + default: + goto defsubdirs; + } + }else if (!strncmp(make, "PENTAX", 6)) { + switch( tag ){ + case 0x005c: + case 0x0205: + case 0x0206: + case 0x0208: + case 0x0216: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + case 0x0215: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,LONG , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + case 0x0207: + { // There are 2 format pentaxLensDataAttribs + int offsetFirst = 4; // LensInfo2 + if( strstr(model, "*ist") || strstr(model, "GX-1") || strstr(model, "K100D") || strstr(model, "K110D") ) + offsetFirst = 3; // LensInfo + else if( strstr(model, "645D") ) + offsetFirst = 13; // LensInfo3 + else if( strstr(model, "K-5") || strstr(model, "K-r") ) + offsetFirst = 12; // LensInfo4 + else if( strstr(model, "K-01") ) + offsetFirst = 15; // LensInfo5 + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,offsetFirst,BYTE , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + } + break; + case 0x0239: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + default: + goto defsubdirs; + } + }else if (!strncmp(make, "Canon", 5)) { + switch( tag ){ + case 0x0001: + case 0x0002: + case 0x0004: + case 0x0005: + case 0x0093: + case 0x0098: + case 0x00a0: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,SSHORT , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + case 0x009a: + case 0x4013: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,LONG , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + default: + goto defsubdirs; + } + }else if (!strncmp(make, "NIKON", 5)) { + switch (tag) { + case 0x0025: { + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + } + default: + goto defsubdirs; + } + }else if(type==UNDEFINED){ + count = 1; + type = LONG; + directory = new TagDirectory*[2]; + directory[0] = new TagDirectory (parent, f, base, attrib->subdirAttribs, order); + directory[1] = NULL; + }else + goto defsubdirs; + } + else { + // read value + value = new unsigned char [valuesize]; + fread (value, 1, valuesize, f); + } + // seek back to the saved position + fseek (f, save, SEEK_SET); return; - } - // save file position - int save = ftell(f) + 4; +defsubdirs: + // read value + value = new unsigned char [valuesize]; + fread (value, 1, valuesize, f); + int pos = ftell (f); + // count the number of valid subdirs + int sdcount = count; + if (sdcount>0) { + if (parent->getAttribTable()==olympusAttribs) + sdcount = 1; + // allocate space + directory = new TagDirectory*[sdcount+1]; + // load directories + for (size_t j=0,i=0; jsubdirAttribs, order); + fseek (f, pos, SEEK_SET); + } + // set the terminating NULL + directory[sdcount] = NULL; + } + else + type = INVALID; - // load value field (possibly seek before) - valuesize = count * getTypeSize(type); + // seek back to the saved position + fseek (f, save, SEEK_SET); + return; - if (valuesize > 4) - fseek (f, get4(f, getOrder()) + base, SEEK_SET); +} - attrib = parent->getAttrib (tag); - - if (attrib && (attrib->action==1 || attrib->action==3)) - keep = true; - - // if this tag is the makernote, it needs special treatment (brand specific parsing) - if (tag==0x927C && attrib && !strcmp (attrib->name, "MakerNote")) { +bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) +{ value = NULL; - // select format of makernote - char make[128], model[128]; - Tag* tmake = parent->getParent()->getTag ("Make"); - if (tmake) - tmake->toString (make); - else - make[0] = 0; - Tag* tmodel = parent->getParent()->getTag ("Model"); - if (tmodel) - tmodel->toString (model); - else - model[0] = 0; - if (!strncmp(make, "NIKON", 5)) { - if (!strncmp(model, "NIKON E700",10)||!strncmp(model, "NIKON E800",10)||!strncmp(model, "NIKON E900",10)||!strncmp(model, "NIKON E900S",11)||!strncmp(model, "NIKON E910", 10)||!strncmp(model, "NIKON E950", 10)) { + Tag* tmake = parent->getRoot()->findTag("Make"); + std::string make( tmake ? tmake->valueToString():""); + + Tag* tmodel = parent->getRoot()->findTag ("Model"); + std::string model( tmodel ? tmodel->valueToString():""); + + if ( make.find( "NIKON" ) != std::string::npos ) { + if ( model.find("NIKON E700")!= std::string::npos || + model.find("NIKON E800")!= std::string::npos || + model.find("NIKON E900")!= std::string::npos || + model.find("NIKON E900S")!= std::string::npos || + model.find("NIKON E910")!= std::string::npos || + model.find("NIKON E950")!= std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[8]; fread (value, 1, 8, f); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, nikon2Attribs, getOrder()); + directory[0] = new TagDirectory (parent, f, base, nikon2Attribs, bom); directory[1] = NULL; - } - else if (!strncmp(model, "NIKON E990",10)||(!strncmp(model, "NIKON D1",8) && model[8]!='0')) { + } else if ( model.find("NIKON E990")!= std::string::npos || + (model.find("NIKON D1")!= std::string::npos && model.size()>8 && model.at(8)!='0')) { makerNoteKind = IFD; directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, nikon3Attribs, getOrder()); + directory[0] = new TagDirectory (parent, f, base, nikon3Attribs, bom); directory[1] = NULL; - } - else { + } else { // needs refinement! (embedded tiff header parsing) makerNoteKind = NIKON3; valuesize = 18; @@ -513,26 +778,23 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) int basepos = ftell (f); fread (value, 1, 18, f); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, basepos+10, nikon3Attribs, getOrder()); + directory[0] = new TagDirectory (parent, f, basepos+10, nikon3Attribs, bom); directory[1] = NULL; } - } - else if (!strncmp(make, "Canon", 5)) { + } else if ( make.find( "Canon" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, canonAttribs, getOrder()); + directory[0] = new TagDirectory (parent, f, base, canonAttribs, bom); directory[1] = NULL; - } - else if (!strncmp(make, "PENTAX", 6)) { + } else if ( make.find( "PENTAX" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 6; value = new unsigned char[6]; fread (value, 1, 6, f); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, pentaxAttribs, getOrder()); + directory[0] = new TagDirectory (parent, f, base, pentaxAttribs, bom); directory[1] = NULL; - } - else if (!strncmp(make, "FUJIFILM", 8)) { + } else if ( make.find( "FUJIFILM" ) != std::string::npos ) { makerNoteKind = FUJI; valuesize = 12; value = new unsigned char[12]; @@ -540,28 +802,25 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell(f)-12, fujiAttribs, INTEL); directory[1] = NULL; - } - else if (!strncmp(make, "KONICA MINOLTA", 14) || !strncmp(make, "Minolta", 7)) { + } else if ( make.find( "KONICA MINOLTA" ) != std::string::npos || make.find( "Minolta" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, minoltaAttribs, getOrder()); + directory[0] = new TagDirectory (parent, f, base, minoltaAttribs, bom); directory[1] = NULL; - } - else if (!strncmp(make, "SONY", 4)) { + } else if ( make.find( "SONY" ) != std::string::npos ) { valuesize = 12; value = new unsigned char[12]; fread (value, 1, 12, f); - if (!strncmp((char*)value, "SONY DSC", 8)) + if (!strncmp((char*)value, "SONY DSC", 8)) makerNoteKind = HEADERIFD; else { makerNoteKind = IFD; fseek (f, -12, SEEK_CUR); } directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, sonyAttribs, getOrder()); + directory[0] = new TagDirectory (parent, f, base, sonyAttribs, bom ); directory[1] = NULL; - } - else if (!strncmp(make, "OLYMPUS", 7)) { + } else if ( make.find( "OLYMPUS" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[12]; @@ -573,147 +832,11 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) fread (value+8, 1, 4, f); valuesize = 12; directory[0] = new TagDirectory (parent, f, ftell(f)-12, olympusAttribs, value[8]=='I' ? INTEL : MOTOROLA); - } - else - directory[0] = new TagDirectory (parent, f, base, olympusAttribs, getOrder()); - } - else { - type = INVALID; - fseek (f, save, SEEK_SET); - return; - } - } - else if (attrib && attrib->subdirAttribs) { - // Some subdirs are specific of maker and model - char make[128], model[128]; - Tag* tmake = parent->getRoot()->getTag ("Make"); - if (tmake) tmake->toString (make); - else make[0] = 0; - Tag* tmodel = parent->getRoot()->getTag ("Model"); - if (tmodel) tmodel->toString (model); - else model[0] = 0; - - - if (!strncmp(make, "SONY", 4)) { - switch( tag ){ - case 0x0114: - { - directory = new TagDirectory*[2]; - directory[1] = NULL; - if( strstr(model, "A330") || strstr(model, "A380") ) - directory[0] = new TagDirectoryTable (parent, f, valuesize*2,0,SHORT , sonyCameraSettingsAttribs2, MOTOROLA); - else - directory[0] = new TagDirectoryTable (parent, f, valuesize*2,0,SHORT , sonyCameraSettingsAttribs, MOTOROLA); - makerNoteKind = TABLESUBDIR; - } - break; - default: - goto defsubdirs; - } - }else if (!strncmp(make, "PENTAX", 6)) { - switch( tag ){ - case 0x005c: - case 0x0205: - case 0x0206: - case 0x0208: - case 0x0216: - directory = new TagDirectory*[2]; - directory[1] = NULL; - directory[0] = new TagDirectoryTable (parent, f, valuesize,0,BYTE , attrib->subdirAttribs, getOrder()); - makerNoteKind = TABLESUBDIR; - break; - case 0x0215: - directory = new TagDirectory*[2]; - directory[1] = NULL; - directory[0] = new TagDirectoryTable (parent, f, valuesize,0,LONG , attrib->subdirAttribs, getOrder()); - makerNoteKind = TABLESUBDIR; - break; - case 0x0207: - { // There are 2 format pentaxLensDataAttribs - int offsetFirst = 4; - if( strstr(model, "*ist") || strstr(model, "GX-1") || strstr(model, "K100D") || strstr(model, "K110D") ) - offsetFirst = 3; - if( strstr(model, "K-5") || strstr(model, "K-r") ) - offsetFirst = 12; - directory = new TagDirectory*[2]; - directory[1] = NULL; - directory[0] = new TagDirectoryTable (parent, f, valuesize,offsetFirst,BYTE , attrib->subdirAttribs, getOrder()); - makerNoteKind = TABLESUBDIR; - } - break; - default: - goto defsubdirs; - } - }else if (!strncmp(make, "Canon", 5)) { - switch( tag ){ - case 0x0001: - case 0x0002: - case 0x0004: - case 0x0005: - case 0x0093: - case 0x0098: - case 0x00a0: - directory = new TagDirectory*[2]; - directory[1] = NULL; - directory[0] = new TagDirectoryTable (parent, f, valuesize,0,SSHORT , attrib->subdirAttribs, getOrder()); - makerNoteKind = TABLESUBDIR; - break; - case 0x009a: - case 0x4013: - directory = new TagDirectory*[2]; - directory[1] = NULL; - directory[0] = new TagDirectoryTable (parent, f, valuesize,0,LONG , attrib->subdirAttribs, getOrder()); - makerNoteKind = TABLESUBDIR; - break; - default: - goto defsubdirs; - } - }else if(type==UNDEFINED){ - count = 1; - type = LONG; - directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, base, attrib->subdirAttribs, getOrder()); - directory[1] = NULL; - }else - goto defsubdirs; - } - else { - // read value - value = new unsigned char [valuesize]; - fread (value, 1, valuesize, f); - } - // seek back to the saved position - fseek (f, save, SEEK_SET); - return; -defsubdirs: - // read value - value = new unsigned char [valuesize]; - fread (value, 1, valuesize, f); - int pos = ftell (f); - // count the number of valid subdirs - int sdcount = count; - if (sdcount>0) { - if (parent->getAttribTable()==olympusAttribs) - sdcount = 1; - // allocate space - directory = new TagDirectory*[sdcount+1]; - // load directories - for (size_t j=0,i=0; jsubdirAttribs, getOrder()); - fseek (f, pos, SEEK_SET); - } - // set the terminating NULL - directory[sdcount] = NULL; - } - else - type = INVALID; - -// seek back to the saved position -fseek (f, save, SEEK_SET); -return; - + } else + directory[0] = new TagDirectory (parent, f, base, olympusAttribs, bom); + } else + return false; + return true; } Tag* Tag::clone (TagDirectory* parent) { @@ -782,7 +905,7 @@ void Tag::fromInt (int v) { void Tag::fromString (const char* v, int size) { - if( value && allocOwnMemory) + if( value && allocOwnMemory) delete [] value; if (size<0) valuesize = strlen (v) + 1; @@ -795,6 +918,8 @@ void Tag::fromString (const char* v, int size) { } int Tag::toInt (int ofs, TagType astype) { + if (attrib) + return attrib->interpreter->toInt(this, ofs, astype); int a; if (astype == INVALID) @@ -816,7 +941,10 @@ int Tag::toInt (int ofs, TagType astype) { } double Tag::toDouble (int ofs) { - union IntFloat { uint32_t i; float f; } conv; + if (attrib) + return attrib->interpreter->toDouble(this, ofs); + + union IntFloat { uint32_t i; float f; } conv; double ud, dd; switch (type) { @@ -838,6 +966,17 @@ double Tag::toDouble (int ofs) { return 0.; } +/** + * @brief Create an array of the elements + */ +double *Tag::toDoubleArray(int ofs) { + double *values = new double[count]; + for (int i=0; i maxcount) @@ -1005,7 +1144,7 @@ int Tag::write (int offs, int dataOffs, unsigned char* buffer) { return dataOffs; } else if( makerNoteKind==TABLESUBDIR){ - sset4 (dataOffs, buffer+offs, parent->getOrder()); + sset4 (dataOffs, buffer+offs, parent->getOrder()); dataOffs = directory[0]->write (dataOffs, buffer); return dataOffs; } @@ -1057,7 +1196,7 @@ void Tag::initType (unsigned char *data, TagType type) value = new unsigned char[valuesize]; memcpy ((char*)value, data, valuesize); }else - value = data; + value = data; } void Tag::initInt (int data, TagType t, int cnt) { @@ -1067,6 +1206,8 @@ void Tag::initInt (int data, TagType t, int cnt) { valuesize = 4; else if (t==SHORT) valuesize = 2; + else if (t==BYTE) + valuesize = 1; else if (t==RATIONAL) valuesize = 8; @@ -1187,7 +1328,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) if (numOfTags > 100) return; float exptime, shutter, aperture, fnumber, ev; - exptime = fnumber = shutter = aperture = ev = -1000; + exptime = fnumber = shutter = aperture = ev = -1000.f; int focal_len, iso; focal_len = iso = -1; @@ -1285,12 +1426,12 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) saveCIFFMNTag (f, root, len, "CanonShotInfo"); iso = pow (2, (get4(f, INTEL),get2(f, INTEL))/32.0 - 4) * 50; - aperture = ((get2(f, INTEL),(short)get2(f, INTEL))/32.0); + aperture = (get2(f, INTEL),(short)get2(f, INTEL))/32.0f; fnumber = pow (2, aperture/2); - shutter = ((short)get2(f, INTEL))/32.0; - ev = ((short)get2(f, INTEL))/32.0; + shutter = ((short)get2(f, INTEL))/32.0f; + ev = ((short)get2(f, INTEL))/32.0f; fseek (f, 34, SEEK_CUR); - if (shutter > 1e6) shutter = get2 (f, INTEL) / 10.0; + if (shutter > 1e6) shutter = get2 (f, INTEL) / 10.0f; exptime = pow (2,-shutter); } if (type == 0x5029) { @@ -1862,13 +2003,13 @@ unsigned short sget2 (unsigned char *s, rtexif::ByteOrder order) { else return s[0] << 8 | s[1]; } -int sget4 (unsigned char *s, rtexif::ByteOrder order) { +inline int sget4 (unsigned char *s, rtexif::ByteOrder order) { if (order == rtexif::INTEL) return s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; else return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; } -unsigned short get2 (FILE* f, rtexif::ByteOrder order) { +inline unsigned short get2 (FILE* f, rtexif::ByteOrder order) { unsigned char str[2] = { 0xff,0xff }; fread (str, 1, 2, f); diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 29ee62ca1..4101d73d5 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -24,19 +24,37 @@ #include #include #include +#include #include #include #include "../rtengine/procparams.h" namespace rtexif { -enum TagType {INVALID=0, BYTE=1, ASCII=2, SHORT=3, LONG=4, RATIONAL=5, UNDEFINED=7, SSHORT=8, SLONG=9, SRATIONAL=10, FLOAT=11, DOUBLE=12, OLYUNDEF=13, SUBDIR=99}; -enum ActionCode {DONTWRITE=0, WRITE=1, SYSTEM=2}; +enum TagType {INVALID=0, BYTE=1, ASCII=2, SHORT=3, LONG=4, RATIONAL=5, UNDEFINED=7, SSHORT=8, SLONG=9, SRATIONAL=10, FLOAT=11, DOUBLE=12, OLYUNDEF=13, AUTO=98, SUBDIR=99}; +enum ActionCode { + AC_DONTWRITE, // don't write it to the output + AC_WRITE, // write it to the output + AC_SYSTEM, // changed by RT (not editable/deletable) - don't write, don't show + AC_NEW, // new addition - write, don't show + + AC_INVALID=100, // invalid state +}; enum ByteOrder {INTEL=0x4949, MOTOROLA=0x4D4D}; enum MNKind {NOMK, IFD, HEADERIFD, NIKON3, OLYMPUS2, FUJI,TABLESUBDIR}; bool extractLensInfo(std::string &fullname,double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal); +unsigned short sget2 (unsigned char *s, ByteOrder order); +int sget4 (unsigned char *s, ByteOrder order); +inline unsigned short get2 (FILE* f, ByteOrder order); +inline int get4 (FILE* f, ByteOrder order); +inline void sset2 (unsigned short v, unsigned char *s, ByteOrder order); +inline void sset4 (int v, unsigned char *s, ByteOrder order); +inline float int_to_float (int i); +short int int2_to_signed (short unsigned int i); + + struct TIFFHeader { unsigned short byteOrder; @@ -47,18 +65,24 @@ struct TIFFHeader { class Tag; class Interpreter; -// structure of informations describing an exif tag +/// Structure of informations describing an Exif tag struct TagAttrib { int ignore; // =0: never ignore, =1: always ignore, =2: ignore if the subdir type is reduced image, =-1: end of table - int action; //=0: dont write it to the output, =1: write it to the output, =2: dont write, dont show, =3: write, dont show + ActionCode action; int editable; - const TagAttrib* subdirAttribs; // =0 ->not subdir - unsigned short ID; // Numeric identifier of tag (or index inside DirectoryTable) + const TagAttrib* subdirAttribs; // !NULL if this tag points to a subdir + /** Numeric identifier of tag (or index inside DirectoryTable) + To avoid rewriting all the tables, and to address the problem of TagDirectoryTable with heterogeneous tag's type, + this parameter is now an unsigned int, where the leftmost 2 bytes represent the tag's type, which by default will be aqual + to 0 (INVALID). Only non null tag type will be used. See nikon attrib for an example + */ + unsigned short ID; + TagType type; const char* name; - Interpreter* interpreter; + Interpreter* interpreter; // Call back hook }; -// a directory of tags +/// A directory of tags class TagDirectory { protected: @@ -66,7 +90,7 @@ class TagDirectory { const TagAttrib* attribs; // descriptor table to decode the tags ByteOrder order; // byte order TagDirectory* parent; // parent directory (NULL if root) - + public: TagDirectory (); TagDirectory (TagDirectory* p, FILE* f, int base, const TagAttrib* ta, ByteOrder border, bool skipIgnored=true); @@ -78,10 +102,12 @@ class TagDirectory { TagDirectory* getRoot (); inline int getCount () const { return tags.size (); } const TagAttrib* getAttrib (int id); - const TagAttrib* getAttrib (const char* name); + const TagAttrib* getAttrib (const char* name); // Find a Tag by scanning the whole tag tree and stopping at the first occurrence + const TagAttrib* getAttribP (const char* name); // Try to get the Tag at a given location. 'name' is a path relative to this directory (e.g. "LensInfo/FocalLength") const TagAttrib* getAttribTable() { return attribs; } - virtual Tag* getTag (const char* name) const; - virtual Tag* getTag (int ID) const; + Tag* getTag (const char* name) const; // Find a Tag by scanning the whole tag tree and stopping at the first occurrence + Tag* getTagP (const char* name) const; // Try to get the Tag at a given location. 'name' is a path relative to this directory (e.g. "LensInfo/FocalLength") + Tag* getTag (int ID) const; virtual Tag* findTag (const char* name) const; bool getXMPTagValue(const char* name, char* value) const; @@ -97,7 +123,7 @@ class TagDirectory { virtual TagDirectory* clone (TagDirectory* parent); virtual void applyChange (std::string field, std::string value); - virtual void printAll () const; + virtual void printAll (unsigned int level=0) const; // reentrant debug function, keep level=0 on first call ! virtual void sort (); }; @@ -134,7 +160,8 @@ class Tag { TagDirectory* parent; TagDirectory** directory; MNKind makerNoteKind; - + bool parseMakerNote(FILE* f, int base, ByteOrder bom ); + public: Tag (TagDirectory* parent, FILE* f, int base); // parse next tag from the file Tag (TagDirectory* parent, const TagAttrib* attr); @@ -154,7 +181,7 @@ class Tag { // get basic tag properties int getID () const { return tag; } int getCount () const { return count; } - TagType getType () const { return type; } + TagType getType () const { return (attrib && attrib->type > INVALID && attrib->type < AUTO) ? attrib->type : type; } unsigned char* getValue () const { return value; } const TagAttrib* getAttrib () const { return attrib; } inline ByteOrder getOrder () const { return parent ? parent->getOrder() : INTEL; } @@ -163,15 +190,17 @@ class Tag { bool getOwnMemory() const { return allocOwnMemory; } // read/write value - int toInt (int ofs=0, TagType astype=INVALID); - void fromInt (int v); - double toDouble (int ofs=0); - void toRational (int& num, int& denom, int ofs=0); - void toString (char* buffer, int ofs=0); - void fromString (const char* v, int size=-1); - void setInt (int v, int ofs=0, TagType astype=LONG); + int toInt (int ofs=0, TagType astype=INVALID); + void fromInt (int v); + double toDouble (int ofs=0); + double *toDoubleArray (int ofs=0); + void toRational (int& num, int& denom, int ofs=0); + void toString (char* buffer, int ofs=0); + void fromString (const char* v, int size=-1); + void setInt (int v, int ofs=0, TagType astype=LONG); - // additional getter/setter for more confortable use + + // additional getter/setter for more comfortable use std::string valueToString (); std::string nameToString (int i=0); void valueFromString (const std::string& value); @@ -213,22 +242,15 @@ class Interpreter { public: Interpreter () {} virtual ~Interpreter() {}; - virtual std::string toString (Tag* t) { return ""; } - virtual void fromString (Tag* t, const std::string& value) {} -}; - -class StdInterpreter : public Interpreter { - public: - StdInterpreter () {} virtual std::string toString (Tag* t) { - char buffer[1024]; + char buffer[1024]; t->toString (buffer); std::string s(buffer); std::string::size_type p1 = s.find_first_not_of(' '); if( p1 == std::string::npos ) - return s; + return s; else - return s.substr(p1, s.find_last_not_of(' ')-p1+1); + return s.substr(p1, s.find_last_not_of(' ')-p1+1); } virtual void fromString (Tag* t, const std::string& value) { if (t->getType()==SHORT || t->getType()==LONG) @@ -236,8 +258,46 @@ class StdInterpreter : public Interpreter { else t->fromString (value.c_str()); } + // Get the value as a double + virtual double toDouble(Tag* t, int ofs=0) { + double ud, dd; + switch (t->getType()) { + case BYTE: return (double)((int)t->getValue()[ofs]); + case ASCII: return 0.0; + case SSHORT:return (double)int2_to_signed(sget2 (t->getValue()+ofs, t->getOrder())); + case SHORT: return (double)((int)sget2 (t->getValue()+ofs, t->getOrder())); + case SLONG: + case LONG: return (double)((int)sget4 (t->getValue()+ofs, t->getOrder())); + case SRATIONAL: + case RATIONAL: ud = (int)sget4 (t->getValue()+ofs, t->getOrder()); dd = (int)sget4 (t->getValue()+ofs+4, t->getOrder()); return dd==0. ? 0. : (double)ud / (double)dd; + case FLOAT: return double(sget4 (t->getValue()+ofs, t->getOrder())); + case UNDEFINED: return 0.; + default: return 0.; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + } + } + // Get the value as an int + virtual int toInt (Tag* t, int ofs=0, TagType astype=INVALID) { + int a; + if (astype == INVALID || astype==AUTO) + astype = t->getType(); + switch (astype) { + case BYTE: return t->getValue()[ofs]; + case ASCII: return 0; + case SSHORT:return (int)int2_to_signed(sget2 (t->getValue()+ofs, t->getOrder())); + case SHORT: return (int)sget2 (t->getValue()+ofs, t->getOrder()); + case SLONG: + case LONG: return (int)sget4 (t->getValue()+ofs, t->getOrder()); + case SRATIONAL: + case RATIONAL: a = (int)sget4 (t->getValue()+ofs+4, t->getOrder()); return a==0 ? 0 : (int)sget4 (t->getValue()+ofs, t->getOrder()) / a; + case FLOAT: return (int)toDouble(t, ofs); + case UNDEFINED: return 0; + default: return 0; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + } + return 0; + } }; -extern StdInterpreter stdInterpreter; + +extern Interpreter stdInterpreter; class ChoiceInterpreter : public Interpreter { protected: std::map choices; @@ -248,7 +308,7 @@ class ChoiceInterpreter : public Interpreter { if (r!=choices.end()) return r->second; else { - char buffer[1024]; + char buffer[1024]; t->toString (buffer); return std::string (buffer); } @@ -258,92 +318,109 @@ class ChoiceInterpreter : public Interpreter { template< class T > class IntLensInterpreter : public Interpreter { protected: - typedef std::multimap< T, std::string> container_t; - typedef typename std::multimap< T, std::string>::iterator it_t; - typedef std::pair< T, std::string> p_t; - container_t choices; + typedef std::multimap< T, std::string> container_t; + typedef typename std::multimap< T, std::string>::iterator it_t; + typedef std::pair< T, std::string> p_t; + container_t choices; - virtual std::string guess(const T lensID, double focalLength, double maxApertureAtFocal ) - { - it_t r; - size_t nFound = choices.count( lensID ); + virtual std::string guess(const T lensID, double focalLength, double maxApertureAtFocal, double *lensInfoArray) { + it_t r; + size_t nFound = choices.count( lensID ); - switch( nFound ) - { - case 0: // lens Unknown - { - std::ostringstream s; - s << lensID; - return s.str(); - } - case 1: // lens found - r = choices.find ( lensID ); - return r->second; - default: - // More than one hit: we must guess - break; - } + switch( nFound ) { + case 0: // lens Unknown + { + std::ostringstream s; + s << lensID; + return s.str(); + } + case 1: // lens found + r = choices.find ( lensID ); + return r->second; + default: + // More than one hit: we must guess + break; + } + std::string bestMatch("Unknown"); + double a1,a2,f1,f2; - double deltaMin = 1000.; + /* FIRST TRY + * + * Get the lens info (min/man focal, min/max aperture) and compare them to the possible choice + */ + if (lensInfoArray) { + for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ){ + if( !extractLensInfo( r->second ,f1,f2,a1,a2) ) + continue; + if (f1==lensInfoArray[0] && f2==lensInfoArray[1] && a1==lensInfoArray[2] && a2==lensInfoArray[3]) + // can't match better! we take this entry as being the one + return r->second; + } + // No lens found, we update the "unknown" string with the lens info values + if (lensInfoArray[0]==lensInfoArray[1]) + bestMatch += Glib::ustring::compose(" (%1mm", int(lensInfoArray[0])); + else + bestMatch += Glib::ustring::compose(" (%1-%2mm", int(lensInfoArray[0]), int(lensInfoArray[1])); - /* Choose the best match: thanks to exiftool by Phil Harvey - * first throws for "out of focal range" and lower or upper aperture of the lens compared to MaxApertureAtFocal - * if the lens is not constant aperture, calculate aprox. aperture of the lens at focalLength - * and compare with actual aperture. - */ - std::string bestMatch("Unknown"); - std::ostringstream candidates; - for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ){ - double a1,a2,f1,f2,lensAperture,dif; + if (lensInfoArray[2]==lensInfoArray[3]) + bestMatch += Glib::ustring::compose(" f/%1)", Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[2])); + else + bestMatch += Glib::ustring::compose(" f/%1-%2)", + Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[2]), + Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[3])); + } - if( !extractLensInfo( r->second ,f1,f2,a1,a2) ) - continue; - if( f1 == 0. || a1 == 0.) - continue; + /* SECOND TRY + * + * Choose the best match: thanks to exiftool by Phil Harvey + * first throws for "out of focal range" and lower or upper aperture of the lens compared to MaxApertureAtFocal + * if the lens is not constant aperture, calculate aprox. aperture of the lens at focalLength + * and compare with actual aperture. + */ + std::ostringstream candidates; + double deltaMin = 1000.; + for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ){ + double lensAperture,dif; - if( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) - continue; - if( maxApertureAtFocal > 0.1){ - if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 +0.15) - continue; + if( !extractLensInfo( r->second ,f1,f2,a1,a2) ) + continue; + if( f1 == 0. || a1 == 0.) + continue; - if( a1 == a2 || f1 == f2) - lensAperture = a1; - else - lensAperture = exp( log(a1)+(log(a2)-log(a1))/(log(f2)-log(f1))*(log(focalLength)-log(f1)) ); + if( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) + continue; + if( maxApertureAtFocal > 0.1){ + if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 +0.15) + continue; - dif = abs(lensAperture - maxApertureAtFocal); - }else - dif = 0; - if( dif < deltaMin ){ - deltaMin = dif; - bestMatch = r->second; - } - if( dif < 0.15){ - if( candidates.tellp() ) - candidates << "\n or " << r->second; - else - candidates << r->second; - } + if( a1 == a2 || f1 == f2) + lensAperture = a1; + else + lensAperture = exp( log(a1)+(log(a2)-log(a1))/(log(f2)-log(f1))*(log(focalLength)-log(f1)) ); - } - if( !candidates.tellp() ) - return bestMatch; - else - return candidates.str(); - } + dif = abs(lensAperture - maxApertureAtFocal); + }else + dif = 0; + if( dif < deltaMin ){ + deltaMin = dif; + bestMatch = r->second; + } + if( dif < 0.15){ + if( candidates.tellp() ) + candidates << "\n or " << r->second; + else + candidates << r->second; + } + } + if( !candidates.tellp() ) + return bestMatch; + else + return candidates.str(); + } }; inline int getTypeSize( TagType type ); -inline unsigned short sget2 (unsigned char *s, ByteOrder order); -inline int sget4 (unsigned char *s, ByteOrder order); -inline unsigned short get2 (FILE* f, ByteOrder order); -inline int get4 (FILE* f, ByteOrder order); -inline void sset2 (unsigned short v, unsigned char *s, ByteOrder order); -inline void sset4 (int v, unsigned char *s, ByteOrder order); -inline float int_to_float (int i); -inline short int int2_to_signed (short unsigned int i); extern const TagAttrib exifAttribs[]; extern const TagAttrib gpsAttribs[]; @@ -354,6 +431,7 @@ extern const TagAttrib nikon3Attribs[]; extern const TagAttrib canonAttribs[]; extern const TagAttrib pentaxAttribs[]; extern const TagAttrib pentaxLensDataAttribs[]; +extern const TagAttrib pentaxLensInfoQAttribs[]; extern const TagAttrib pentaxAEInfoAttribs[]; extern const TagAttrib pentaxCameraSettingsAttribs[]; extern const TagAttrib pentaxFlashInfoAttribs[]; @@ -363,8 +441,13 @@ extern const TagAttrib pentaxCameraInfoAttribs[]; extern const TagAttrib fujiAttribs[]; extern const TagAttrib minoltaAttribs[]; extern const TagAttrib sonyAttribs[]; +extern const TagAttrib sonyTag9405Attribs[]; +extern const TagAttrib sonyCameraInfoAttribs[]; +extern const TagAttrib sonyCameraInfo2Attribs[]; extern const TagAttrib sonyCameraSettingsAttribs[]; extern const TagAttrib sonyCameraSettingsAttribs2[]; +extern const TagAttrib sonyCameraSettingsAttribs3[]; +//extern const TagAttrib sonyDNGMakerNote[]; extern const TagAttrib olympusAttribs[]; } #endif diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index f386b7bec..04ebb05cf 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -1,5 +1,4 @@ /* - * This file is part of RawTherapee. * * Copyright (c) 2004-2010 Gabor Horvath * @@ -25,6 +24,15 @@ namespace rtexif { +class SANoYesInterpreter : public ChoiceInterpreter { + public: + SANoYesInterpreter () { + choices[1] = "No"; + choices[16] = "Yes"; + } +}; +SANoYesInterpreter saNoYesInterpreter; + class SAOnOffInterpreter : public ChoiceInterpreter { public: SAOnOffInterpreter () { @@ -35,6 +43,218 @@ class SAOnOffInterpreter : public ChoiceInterpreter { }; SAOnOffInterpreter saOnOffInterpreter; +class SAOnOffInterpreter2 : public ChoiceInterpreter { + public: + SAOnOffInterpreter2 () { + choices[1] = "Off"; + choices[16] = "On"; + } +}; +SAOnOffInterpreter2 saOnOffInterpreter2; + +class SAOnOffInterpreter3 : public ChoiceInterpreter { + public: + SAOnOffInterpreter3 () { + choices[1] = "Off"; + choices[16] = "On (Auto)"; + choices[17] = "On (Manual)"; + } +}; +SAOnOffInterpreter3 saOnOffInterpreter3; + +class SAOnOffInterpreter4 : public ChoiceInterpreter { + public: + SAOnOffInterpreter4 () { + choices[0] = "n/a"; + choices[1] = "Off"; + choices[16] = "On"; + choices[255] = "None"; + } +}; +SAOnOffInterpreter4 saOnOffInterpreter4; + +class SAOnOffInterpreter5 : public ChoiceInterpreter { + public: + SAOnOffInterpreter5 () { + choices[1] = "On"; + choices[2] = "Off"; + } +}; +SAOnOffInterpreter5 saOnOffInterpreter5; + +class SAHighISONoiseReduction : public ChoiceInterpreter { + public: + SAHighISONoiseReduction () { + choices[0] = "Off"; + choices[1] = "Low"; + choices[2] = "Normal"; + choices[3] = "High"; + choices[256] = "Auto"; + choices[65535] = "n/a"; + } +}; +SAHighISONoiseReduction saHighISONoiseReduction; + +class SAHighISONoiseReduction2 : public ChoiceInterpreter { + public: + SAHighISONoiseReduction2 () { + choices[0] = "Normal"; + choices[1] = "High"; + choices[2] = "Low"; + choices[3] = "Off"; + choices[65535] = "n/a"; + } +}; +SAHighISONoiseReduction2 saHighISONoiseReduction2; + +class SAHighISONoiseReduction3 : public ChoiceInterpreter { + public: + SAHighISONoiseReduction3 () { + choices[0] = "Normal"; + choices[1] = "Low"; + choices[2] = "High"; + choices[3] = "Off"; + } +}; +SAHighISONoiseReduction3 saHighISONoiseReduction3; + +class SAHighISONoiseReduction4 : public ChoiceInterpreter { + public: + SAHighISONoiseReduction4 () { + choices[0] = "Off"; + choices[1] = "Low"; + choices[2] = "Normal"; + choices[3] = "High"; + } +}; +SAHighISONoiseReduction4 saHighISONoiseReduction4; + +class SAHighISONoiseReduction5 : public ChoiceInterpreter { + public: + SAHighISONoiseReduction5 () { + choices[16] = "Low"; + choices[19] = "Auto"; + } +}; +SAHighISONoiseReduction5 saHighISONoiseReduction5; + +class SASmileShutterMode : public ChoiceInterpreter { + public: + SASmileShutterMode () { + choices[17] = "Slight smile"; + choices[18] = "Normal smile"; + choices[19] = "Big smile"; + } +}; +SASmileShutterMode saSmileShutterMode; + +class SAHDRLevel : public ChoiceInterpreter { + public: + SAHDRLevel () { + choices[33] = "1 EV"; + choices[34] = "1.5 EV"; + choices[35] = "2 EV"; + choices[36] = "2.5 EV"; + choices[37] = "3 EV"; + choices[38] = "3.5 EV"; + choices[39] = "4 EV"; + choices[40] = "5 EV"; + choices[41] = "6 EV"; + } +}; +SAHDRLevel saHDRLevel; + +class SAViewingMode : public ChoiceInterpreter { + public: + SAViewingMode () { + choices[0] = "n/a"; + choices[16] = "ViewFinder"; + choices[33] = "Focus Check Live View"; + choices[34] = "Quick AF Live View"; + } +}; +SAViewingMode saViewingMode; + +class SAFlashAction : public ChoiceInterpreter { + public: + SAFlashAction () { + choices[1] = "Did not fire"; + choices[2] = "Fired"; + } +}; +SAFlashAction saFlashAction; + +class SALiveViewFocusMode : public ChoiceInterpreter { + public: + SALiveViewFocusMode () { + choices[0] = "n/a"; + choices[1] = "AF"; + choices[16] = "Manual"; + } +}; +SALiveViewFocusMode saLiveViewFocusMode; + +class SALensMount : public ChoiceInterpreter { + public: + SALensMount () { + choices[1] = "Unknown"; + choices[16] = "A-Mount"; + choices[17] = "E-Mount"; + } +}; +SALensMount saLensMount; + +class SASweepPanoramaSize : public ChoiceInterpreter { + public: + SASweepPanoramaSize () { + choices[1] = "Standard"; + choices[2] = "Wide"; + } +}; +SASweepPanoramaSize saSweepPanoramaSize; + +class SASweepPanoramaDirection : public ChoiceInterpreter { + public: + SASweepPanoramaDirection () { + choices[1] = "Right"; + choices[2] = "Left"; + choices[3] = "Up"; + choices[4] = "Down"; + } +}; +SASweepPanoramaDirection saSweepPanoramaDirection; + +class SALiveViewAFSetting : public ChoiceInterpreter { + public: + SALiveViewAFSetting () { + choices[0] = "n/a"; + choices[1] = "Phase-detect AF"; + choices[2] = "Contrast AF"; + } +}; +SALiveViewAFSetting saLiveViewAFSetting; + +class SAPanoramaSize3D : public ChoiceInterpreter { + public: + SAPanoramaSize3D () { + choices[0] = "n/a"; + choices[1] = "Standard"; + choices[2] = "Wide"; + choices[3] = "16:9"; + } +}; +SAPanoramaSize3D saPanoramaSize3D; + +class SALiveViewMetering : public ChoiceInterpreter { + public: + SALiveViewMetering () { + choices[0] = "n/a"; + choices[16] = "40 segment"; + choices[32] = "1200-zone Evaluative"; + } +}; +SALiveViewMetering saLiveViewMetering; + class SAWhiteBalanceInterpreter: public ChoiceInterpreter { public: SAWhiteBalanceInterpreter(){ @@ -51,6 +271,64 @@ class SAWhiteBalanceInterpreter: public ChoiceInterpreter { }; SAWhiteBalanceInterpreter saWhiteBalanceInterpreter; +class SAWhiteBalanceSettingInterpreter: public ChoiceInterpreter { + public: + SAWhiteBalanceSettingInterpreter(){ + choices[0x10] = "Auto (-3)"; + choices[0x11] = "Auto (-2)"; + choices[0x12] = "Auto (-1)"; + choices[0x13] = "Auto (0)"; + choices[0x14] = "Auto (+1)"; + choices[0x15] = "Auto (+2)"; + choices[0x16] = "Auto (+3)"; + choices[0x20] = "Daylight (-3)"; + choices[0x21] = "Daylight (-2)"; + choices[0x22] = "Daylight (-1)"; + choices[0x23] = "Daylight (0)"; + choices[0x24] = "Daylight (+1)"; + choices[0x25] = "Daylight (+2)"; + choices[0x26] = "Daylight (+3)"; + choices[0x30] = "Shade (-3)"; + choices[0x31] = "Shade (-2)"; + choices[0x32] = "Shade (-1)"; + choices[0x33] = "Shade (0)"; + choices[0x34] = "Shade (+1)"; + choices[0x35] = "Shade (+2)"; + choices[0x36] = "Shade (+3)"; + choices[0x40] = "Cloudy (-3)"; + choices[0x41] = "Cloudy (-2)"; + choices[0x42] = "Cloudy (-1)"; + choices[0x43] = "Cloudy (0)"; + choices[0x44] = "Cloudy (+1)"; + choices[0x45] = "Cloudy (+2)"; + choices[0x46] = "Cloudy (+3)"; + choices[0x50] = "Tungsten (-3)"; + choices[0x51] = "Tungsten (-2)"; + choices[0x52] = "Tungsten (-1)"; + choices[0x53] = "Tungsten (0)"; + choices[0x54] = "Tungsten (+1)"; + choices[0x55] = "Tungsten (+2)"; + choices[0x56] = "Tungsten (+3)"; + choices[0x60] = "Fluorescent (-3)"; + choices[0x61] = "Fluorescent (-2)"; + choices[0x62] = "Fluorescent (-1)"; + choices[0x63] = "Fluorescent (0)"; + choices[0x64] = "Fluorescent (+1)"; + choices[0x65] = "Fluorescent (+2)"; + choices[0x66] = "Fluorescent (+3)"; + choices[0x70] = "Flash (-3)"; + choices[0x71] = "Flash (-2)"; + choices[0x72] = "Flash (-1)"; + choices[0x73] = "Flash (0)"; + choices[0x74] = "Flash (+1)"; + choices[0x75] = "Flash (+2)"; + choices[0x76] = "Flash (+3)"; + choices[0xa3] = "Custom"; + choices[0xf3] = "Color Temperature/Color Filter"; + } +}; +SAWhiteBalanceSettingInterpreter saWhiteBalanceSettingInterpreter; + class SASceneModeInterpreter : public ChoiceInterpreter { public: SASceneModeInterpreter () { @@ -188,14 +466,17 @@ SAAntiBlurInterpreter saAntiBlurInterpreter; class SALensIDInterpreter : public IntLensInterpreter< int > { public: - SALensIDInterpreter () { + SALensIDInterpreter () { // From EXIFTOOL database 'Sony.pm' V1.94 and 'Minolta' 2.04; + // Please do not remove entries on database synchronization, and avoid transferring "categories' header" types choices.insert(p_t(0, "Minolta AF 28-85mm f/3.5-4.5")); choices.insert(p_t(1, "Minolta AF 80-200mm f/2.8 HS-APO G")); choices.insert(p_t(2, "Minolta AF 28-70mm f/2.8 G")); choices.insert(p_t(3, "Minolta AF 28-80mm f/4-5.6")); + choices.insert(p_t(4, "Minolta AF 85mm f/1.4G")); choices.insert(p_t(5, "Minolta AF 35-70mm f/3.5-4.5")); - choices.insert(p_t(6, "Minolta AF 24-85mm f/3.5-4.5 [New]")); - choices.insert(p_t(7, "Minolta AF 100-300mm f/4.5-5.6 APO [New]")); + choices.insert(p_t(6, "Minolta AF 24-85mm f/3.5-4.5")); + choices.insert(p_t(7, "Minolta AF 100-300mm f/4.5-5.6 APO")); + choices.insert(p_t(7, "Minolta AF 100-400mm f/4.5-6.7 APO")); choices.insert(p_t(7, "Sigma AF 100-300mm f/4 EX DG IF")); choices.insert(p_t(8, "Minolta AF 70-210mm f/4.5-5.6")); choices.insert(p_t(9, "Minolta AF 50mm f/3.5 Macro")); @@ -208,39 +489,44 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(16, "Minolta AF 17-35mm f/3.5 G")); choices.insert(p_t(17, "Minolta AF 20-35mm f/3.5-4.5")); choices.insert(p_t(18, "Minolta AF 28-80mm f/3.5-5.6 II")); - choices.insert(p_t(19, "Minolta AF 35mm f/1.4")); - choices.insert(p_t(20, "Minolta/Sony STF 135mm F2.8 [T4.5]")); - choices.insert(p_t(22, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(23, "Minolta AF 200mm f/4 G APO Macro")); + choices.insert(p_t(19, "Minolta AF 35mm f/1.4 G")); + choices.insert(p_t(20, "Minolta/Sony 135mm f/2.8 [T4.5] STF")); + choices.insert(p_t(22, "Minolta AF 35-80mm f/4-5.6 II")); + choices.insert(p_t(23, "Minolta AF 200mm f/4 Macro APO G")); choices.insert(p_t(24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D)")); choices.insert(p_t(24, "Sigma 18-50mm f/2.8 EX DC Macro")); choices.insert(p_t(24, "Sigma 17-70mm f/2.8-4.5 DC Macro")); choices.insert(p_t(24, "Sigma 20-40mm f/2.8 EX DG Aspherical IF")); choices.insert(p_t(24, "Sigma 18-200mm f/3.5-6.3 DC")); + choices.insert(p_t(24, "Sigma 18-125mm f/4-5,6 DC")); choices.insert(p_t(24, "Tamron SP AF 28-75mm f/2.8 XR Di (IF) Macro")); choices.insert(p_t(25, "Minolta AF 100-300mm f/4.5-5.6 APO D")); choices.insert(p_t(25, "Sigma 100-300mm f/4 EX DG APO")); choices.insert(p_t(25, "Sigma 70mm f/2.8 EX DG Macro")); choices.insert(p_t(25, "Sigma 20mm f/1.8 EX DG Aspherical RF")); - choices.insert(p_t(25, "Sigma 30mm f/1.4 EX DG")); - choices.insert(p_t(27, "Minolta AF 85mm f71.4 G")); - choices.insert(p_t(28, "Minolta AF 100mm f/2.8 Macro (D)")); - choices.insert(p_t(28, "Tamron SP AF 90mm f/2.8 Di Macro ")); - choices.insert(p_t(29, "Minolta AF 75-300mm f/4.5-5.6 (D)")); + choices.insert(p_t(25, "Sigma 30mm f/1.4 EX DC")); + choices.insert(p_t(25, "Sigma 24mm f/1.8 EX DG ASP Macro")); + choices.insert(p_t(27, "Minolta AF 85mm f/1.4 G (D)")); + choices.insert(p_t(28, "Minolta/Sony AF 100mm f/2.8 Macro (D)")); + choices.insert(p_t(28, "Tamron SP AF 90mm f/2.8 Di Macro")); + choices.insert(p_t(28, "Tamron AF 180mm f/3.5 SP Di LD [IF] Macro")); + choices.insert(p_t(29, "Minolta/Sony AF 75-300mm f/4.5-5.6 (D)")); choices.insert(p_t(30, "Minolta AF 28-80mm f/3.5-5.6 (D)")); - choices.insert(p_t(30, "Sigma 10-20mm f/4-5.6 EX DC")); - choices.insert(p_t(30, "Sigma 12-24mm f/4.5-5.6 EX DG")); - choices.insert(p_t(30, "Sigma 28-70mm f/2.8 EX DG")); + choices.insert(p_t(30, "Sigma AF 10-20mm f/4-5.6 EX DC")); + choices.insert(p_t(30, "Sigma AF 12-24mm f/4.5-5.6 EX DG")); + choices.insert(p_t(30, "Sigma 28-70mm EX DG F2.8")); choices.insert(p_t(30, "Sigma 55-200mm f/4-5.6 DC")); choices.insert(p_t(31, "Minolta/Sony AF 50mm f/2.8 Macro (D)")); - choices.insert(p_t(32, "Minolta AF 300mm f/2.8 G")); - choices.insert(p_t(33, "Minolta/Sony AF 70-200mm f/2.8 G (D) SSM")); + choices.insert(p_t(31, "Minolta/Sony AF 50mm f/3.5 Macro")); + choices.insert(p_t(32, "Minolta/Sony AF 300mm f/2.8 G or 1.5x Teleconverter")); + choices.insert(p_t(33, "Minolta/Sony AF 70-200mm f/2.8 G")); choices.insert(p_t(35, "Minolta AF 85mm f/1.4 G (D) Limited")); choices.insert(p_t(36, "Minolta AF 28-100mm f/3.5-5.6 (D)")); choices.insert(p_t(38, "Minolta AF 17-35mm f/2.8-4 (D)")); choices.insert(p_t(39, "Minolta AF 28-75mm f/2.8 (D)")); choices.insert(p_t(40, "Minolta/Sony AF DT 18-70mm f/3.5-5.6 (D)")); choices.insert(p_t(41, "Minolta/Sony AF DT 11-18mm f/4.5-5.6 (D)")); + choices.insert(p_t(41, "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical IF")); choices.insert(p_t(42, "Minolta AF DT 18-200mm f/3.5-6.3 (D)")); choices.insert(p_t(43, "Minolta AF 35mm f/1.4 G")); choices.insert(p_t(44, "Sony AF 50mm f/1.4")); @@ -250,8 +536,9 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM")); choices.insert(p_t(49, "Sony AF DT 55-200mm f/4-5.6")); choices.insert(p_t(50, "Sony AF DT 18-250mm f/3.5-6.3")); - choices.insert(p_t(51, "Sony AF DT 16-105mm f/3.5-5.6 or 55-200mm f/4-5.5")); + choices.insert(p_t(51, "Sony AF DT 16-105mm f/3.5-5.6")); choices.insert(p_t(52, "Sony AF 70-300mm f/4.5-5.6 G SSM")); + choices.insert(p_t(52, "Tamron SP 70-300mm f/4-5.6 Di VC USD")); choices.insert(p_t(53, "Sony AF 70-400mm f/4.5-5.6 G SSM")); choices.insert(p_t(54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM")); choices.insert(p_t(55, "Sony DT 18-55mm f/3.5-5.6 SAM")); @@ -266,19 +553,27 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(62, "Sony DT 35mm f/1.8 SAM")); choices.insert(p_t(63, "Sony DT 16-50mm f/2.8 SSM")); choices.insert(p_t(64, "Sony 500mm f/4.0 G SSM")); + choices.insert(p_t(65, "Sony DT 18-135mm f/3.5-5.6 SAM")); + choices.insert(p_t(66, "Sony 300mm f/2.8 G SSM II")); + choices.insert(p_t(68, "Sony DT 55-300mm f/4.5-5.6 SAM")); + choices.insert(p_t(69, "Sony 70-400mm f/4-5.6 G SSM II")); + choices.insert(p_t(70, "Carl Zeiss Planar T* 50mm f/1.4 ZA SSM")); choices.insert(p_t(128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)")); choices.insert(p_t(128, "Tamron AF 28-300mm f/3.5-6.3")); - choices.insert(p_t(128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical (IF) Macro ")); + choices.insert(p_t(128, "Tamron 80-300mm f/3.5-6.3")); + choices.insert(p_t(128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical [IF] Macro")); choices.insert(p_t(128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF")); choices.insert(p_t(128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II")); - choices.insert(p_t(128, "Sigma 10-20mm f/3.5 EX DC")); - choices.insert(p_t(128, "Sigma 70-200mm f/2.8 II EX DG APO Macro")); + choices.insert(p_t(128, "Sigma 10-20mm f/3.5 EX DC HSM")); + choices.insert(p_t(128, "Sigma 70-200mm f/2.8 II EX DG APO Macro HSM")); choices.insert(p_t(128, "Sigma 10mm f/2.8 EX DC HSM Fisheye")); choices.insert(p_t(128, "Sigma 50mm f/1.4 EX DG HSM")); choices.insert(p_t(128, "Sigma 85mm f/1.4 EX DG HSM")); choices.insert(p_t(128, "Sigma 24-70mm f/2.8 IF EX DG HSM")); choices.insert(p_t(128, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); - choices.insert(p_t(129, "Tamron 200-400mm f/5.6 LD (IF)")); + choices.insert(p_t(128, "Sigma 17-50mm f/2.8 EX DC HSM")); + choices.insert(p_t(128, "Sigma 17-70mm f/2.8-4 DC Macro HSM")); + choices.insert(p_t(129, "Tamron 200-400mm f/5.6 LD")); choices.insert(p_t(129, "Tamron 70-300mm f/4-5.6 LD")); choices.insert(p_t(131, "Tamron 20-40mm f/2.7-3.5 SP Aspherical IF")); choices.insert(p_t(135, "Vivitar 28-210mm f/3.5-5.6")); @@ -289,12 +584,12 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL")); choices.insert(p_t(255, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical")); choices.insert(p_t(255, "Tamron AF 18-250mm f/3.5-6.3 XR Di II LD")); - choices.insert(p_t(255, "Tamron AF 55-200mm f/4-5.6 Di II")); + choices.insert(p_t(255, "Tamron AF 55-200mm f/4-5.6 Di II LD Macro")); choices.insert(p_t(255, "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2")); - choices.insert(p_t(255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD (IF)")); - choices.insert(p_t(255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF)")); - choices.insert(p_t(255, "Tamron SP AF 70-200mm f/2.8 Di LD Macro (IF)")); - choices.insert(p_t(255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF)")); + choices.insert(p_t(255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD [IF]")); + choices.insert(p_t(255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical [IF]")); + choices.insert(p_t(255, "Tamron SP AF 70-200mm f/2.8 Di LD Macro [IF]")); + choices.insert(p_t(255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF]")); choices.insert(p_t(2550, "Minolta AF 50mm f/1.7")); choices.insert(p_t(2551, "Minolta AF 35-70mm f/4")); choices.insert(p_t(2551, "Sigma UC AF 28-70mm f/3.5-4.5")); @@ -407,7 +702,7 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(25511, "Sigma AF 28-70mm f/2.8")); choices.insert(p_t(25511, "Sigma M-AF 70-200mm f/2.8 EX Aspherical")); choices.insert(p_t(25511, "Quantaray M-AF 35-80mm f/4-5.6")); - choices.insert(p_t(25521, "Minolta AF 28-85mm f/3.5-4.5 [New]")); + choices.insert(p_t(25521, "Minolta AF 28-85mm f/3.5-4.5")); choices.insert(p_t(25521, "Tokina 19-35mm f/3.5-4.5")); choices.insert(p_t(25521, "Tokina 28-70mm f/2.8 AT-X")); choices.insert(p_t(25521, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840")); @@ -415,16 +710,18 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(25521, "Tokina AT-X PRO II AF 28-70mm f/2.6-2.8 270")); choices.insert(p_t(25521, "Tamron AF 19-35mm f/3.5-4.5")); choices.insert(p_t(25521, "Angenieux AF 28-70mm f/2.6")); + choices.insert(p_t(25521, "Tokina AT-X 17 AF 17mm f/3.5")); choices.insert(p_t(25531, "Minolta AF 28-135mm f/4-4.5")); choices.insert(p_t(25531, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5")); choices.insert(p_t(25531, "Sigma 28-105mm f/2.8-4 Aspherical")); + choices.insert(p_t(25531, "Sigma 28-105mm f/4-5.6 UC")); choices.insert(p_t(25541, "Minolta AF 35-105mm f/3.5-4.5")); choices.insert(p_t(25551, "Minolta AF 70-210mm f/4 Macro")); choices.insert(p_t(25551, "Sigma 70-210mm f/4-5.6 APO")); choices.insert(p_t(25551, "Sigma M-AF 70-200mm f/2.8 EX APO")); choices.insert(p_t(25551, "Sigma 75-200mm f/2.8-3.5")); choices.insert(p_t(25561, "Minolta AF 135mm f/2.8")); - choices.insert(p_t(25571, "Minolta AF 28mm f/2.8")); + choices.insert(p_t(25571, "Minolta/Sony AF 28mm f/2.8")); choices.insert(p_t(25581, "Minolta AF 24-50mm f/4")); choices.insert(p_t(25601, "Minolta AF 100-200mm f/4.5")); choices.insert(p_t(25611, "Minolta AF 75-300mm f/4.5-5.6")); @@ -435,33 +732,40 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(25611, "Tokina AT-X AF 300mm f/4")); choices.insert(p_t(25611, "Tokina AT-X AF 400mm f/5.6 SD")); choices.insert(p_t(25611, "Tokina AF 730 II 75-300mm f/4.5-5.6")); + choices.insert(p_t(25611, "Sigma 800mm f/5.6 APO")); + choices.insert(p_t(25611, "Sigma AF 400mm f/5.6 APO Macro")); choices.insert(p_t(25621, "Minolta AF 50mm f/1.4")); - choices.insert(p_t(25631, "Minolta AF 300mm f/2.8 G")); + choices.insert(p_t(25631, "Minolta AF 300mm f/2.8 APO")); choices.insert(p_t(25631, "Sigma AF 50-500mm f/4-6.3 EX DG APO")); choices.insert(p_t(25631, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); choices.insert(p_t(25631, "Sigma AF 500mm f/4.5 EX DG APO")); choices.insert(p_t(25631, "Sigma 400mm f/5.6 APO")); choices.insert(p_t(25641, "Minolta AF 50mm f/2.8 Macro")); - choices.insert(p_t(25641, "Sigma AF 50mm f/2.8 Macro")); + choices.insert(p_t(25641, "Sigma AF 50mm f/2.8 EX Macro")); choices.insert(p_t(25651, "Minolta AF 600mm f/4")); choices.insert(p_t(25661, "Minolta AF 24mm f/2.8")); + choices.insert(p_t(25661, "Sigma 17-35mm f/2.8-4 EX Aspherical")); choices.insert(p_t(25721, "Minolta/Sony AF 500mm f/8 Reflex")); - choices.insert(p_t(25781, "Minolta AF 16mm f/2.8 Fisheye")); + choices.insert(p_t(25781, "Minolta/Sony AF 16mm f/2.8 Fisheye")); choices.insert(p_t(25781, "Sigma 8mm f/4 EX DG Fisheye")); choices.insert(p_t(25781, "Sigma 14mm f/3.5")); choices.insert(p_t(25781, "Sigma 15mm f/2.8 Fisheye")); - choices.insert(p_t(25791, "Minolta AF 20mm f/2.8")); - choices.insert(p_t(25811, "Minolta/Sony AF 100mm f/2.8 Macro New")); + choices.insert(p_t(25791, "Minolta/Sony AF 20mm f/2.8")); + choices.insert(p_t(25791, "Tokina AT-X Pro DX 11-16mm f/2.8")); + choices.insert(p_t(25811, "Minolta/Sony AF 100mm f/2.8 Macro")); choices.insert(p_t(25811, "Sigma AF 90mm f/2.8 Macro")); choices.insert(p_t(25811, "Sigma AF 105mm f/2.8 EX DG Macro")); choices.insert(p_t(25811, "Sigma 180mm f/5.6 Macro")); + choices.insert(p_t(25811, "Sigma 180mm f/3.5 EX DG Macro")); choices.insert(p_t(25811, "Tamron 90mm f/2.8 Macro")); choices.insert(p_t(25851, "Beroflex 35-135mm f/3.5-4.5")); - choices.insert(p_t(25858, "Minolta AF 35-105mm f/3.5-4.5 New")); + choices.insert(p_t(25858, "Minolta AF 35-105mm f/3.5-4.5")); choices.insert(p_t(25858, "Tamron 24-135mm f/3.5-5.6")); choices.insert(p_t(25881, "Minolta AF 70-210mm f/3.5-4.5")); - choices.insert(p_t(25891, "Minolta AF 80-200 f/2.8 APO")); + choices.insert(p_t(25891, "Minolta AF 80-200mm f/2.8 APO")); choices.insert(p_t(25891, "Tokina 80-200mm f/2.8")); + choices.insert(p_t(25901, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO")); + choices.insert(p_t(25901, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO")); choices.insert(p_t(25911, "Minolta AF 35mm f/1.4")); choices.insert(p_t(25921, "Minolta AF 85mm f/1.4 G (D)")); choices.insert(p_t(25931, "Minolta AF 200mm f/2.8 G APO")); @@ -469,20 +773,22 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(25961, "Minolta AF 28mm f/2")); choices.insert(p_t(25971, "Minolta AF 35mm f/2")); choices.insert(p_t(25981, "Minolta AF 100mm f/2")); + choices.insert(p_t(26011, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO")); + choices.insert(p_t(26011, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO")); choices.insert(p_t(26041, "Minolta AF 80-200mm f/4.5-5.6")); choices.insert(p_t(26051, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(26061, "Minolta AF 100-300mm f/4.5-5.6 (D)")); + choices.insert(p_t(26061, "Minolta AF 100-300mm f/4.5-5.6")); choices.insert(p_t(26071, "Minolta AF 35-80mm f/4-5.6")); choices.insert(p_t(26081, "Minolta AF 300mm f/2.8 HS-APO G")); choices.insert(p_t(26091, "Minolta AF 600mm f/4 HS-APO G")); choices.insert(p_t(26121, "Minolta AF 200mm f/2.8 HS-APO G")); choices.insert(p_t(26131, "Minolta AF 50mm f/1.7 New")); - choices.insert(p_t(26151, "Minolta AF 28-105mm f/3.5-4.5 Power Zoom")); - choices.insert(p_t(26161, "Minolta AF 35-200mm f/4.5-5.6 Power Zoom")); - choices.insert(p_t(26181, "Minolta AF 28-80mm f/4-5.6 Power Zoom")); - choices.insert(p_t(26191, "Minolta AF 80-200mm f/4.5-5.6 Power Zoom")); + choices.insert(p_t(26151, "Minolta AF 28-105mm f/3.5-4.5 xi")); + choices.insert(p_t(26161, "Minolta AF 35-200mm f/4.5-5.6 xi")); + choices.insert(p_t(26181, "Minolta AF 28-80mm f/4-5.6 xi")); + choices.insert(p_t(26191, "Minolta AF 80-200mm f/4.5-5.6 xi")); choices.insert(p_t(26201, "Minolta AF 28-70mm f/2.8 G")); - choices.insert(p_t(26211, "Minolta AF 100-300mm f/4.5-5.6 Power Zoom")); + choices.insert(p_t(26211, "Minolta AF 100-300mm f/4.5-5.6 xi")); choices.insert(p_t(26241, "Minolta AF 35-80mm f/4-5.6 Power Zoom")); choices.insert(p_t(26281, "Minolta AF 80-200mm f/2.8 G")); choices.insert(p_t(26291, "Minolta AF 85mm f/1.4 New")); @@ -490,7 +796,7 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(26321, "Minolta AF 24-50mm f/4 New")); choices.insert(p_t(26381, "Minolta AF 50mm f/2.8 Macro New")); choices.insert(p_t(26391, "Minolta AF 100mm f/2.8 Macro")); - choices.insert(p_t(26411, "Minolta AF 20mm f/2.8 New")); + choices.insert(p_t(26411, "Minolta/Sony AF 20mm f/2.8 New")); choices.insert(p_t(26421, "Minolta AF 24mm f/2.8 New")); choices.insert(p_t(26441, "Minolta AF 100-400mm f/4.5-6.7 APO")); choices.insert(p_t(26621, "Minolta AF 50mm f/1.4 New")); @@ -498,9 +804,38 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(26681, "Minolta AF 28mm f/2 New")); choices.insert(p_t(26721, "Minolta AF 24-105mm f/3.5-4.5 (D)")); choices.insert(p_t(45671, "Tokina 70-210mm f/4-5.6")); + choices.insert(p_t(45741, "Tamron SP AF 90mm f/2.5")); + choices.insert(p_t(45741, "Tokina RF 500mm f/8.0 x2")); + choices.insert(p_t(45741, "Tokina 300mm f/2.8 x2")); choices.insert(p_t(45741, "Minolta AF 200mm f/2.8 G x2")); choices.insert(p_t(45851, "Tamron SP AF 300mm f/2.8 LD IF")); - choices.insert(p_t(45871, "Tamron SP AF 70-210mm f/2.8 LD")); + choices.insert(p_t(45871, "Tamron AF 70-210mm f/2.8 SP LD")); + choices.insert(p_t(65535, "Sony E 16mm f/2.8")); + choices.insert(p_t(65535, "Sony E 18-55mm f/3.5-5.6 OSS")); + choices.insert(p_t(65535, "Sony E 55-210mm f/4.5-6.3 OSS")); + choices.insert(p_t(65535, "Sony E 18-200mm f/3.5-6.3 OSS")); + choices.insert(p_t(65535, "Sony E 30mm f/3.5 Macro")); + choices.insert(p_t(65535, "Sony E 24mm f/1.8 ZA")); + choices.insert(p_t(65535, "Sony E 50mm f/1.8 OSS")); + choices.insert(p_t(65535, "Sony E 16-70mm f/4 ZA OSS")); + choices.insert(p_t(65535, "Sony E 10-18mm f/4 OSS")); + choices.insert(p_t(65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); + choices.insert(p_t(65535, "Sony FE 35mm f/2.8 ZA")); + choices.insert(p_t(65535, "Sony FE 24-70mm f/4 ZA OSS")); + choices.insert(p_t(65535, "Sony E 18-200mm f/3.5-6.3 OSS LE")); + choices.insert(p_t(65535, "Sony E 20mm f/2.8")); + choices.insert(p_t(65535, "Sony E 35mm f/1.8 OSS")); + choices.insert(p_t(65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); + choices.insert(p_t(65535, "Sony FE 55mm f/1.8 ZA")); + choices.insert(p_t(65535, "Sony FE 28-70mm f/3.5-5.6 OSS")); + choices.insert(p_t(65535, "Sony E PZ 18-105mm f/4 G OSS")); + choices.insert(p_t(65535, "Sony FE 70-200mm f/4 G OSS")); + choices.insert(p_t(65535, "Sigma 19mm f/2.8 [EX] DN")); + choices.insert(p_t(65535, "Sigma 30mm f/2.8 [EX] DN")); + choices.insert(p_t(65535, "Sigma 60mm f/2.8 DN")); + choices.insert(p_t(65535, "Tamron 18-200mm f/3.5-6.3 Di III VC")); + choices.insert(p_t(65535, "Zeiss Touit 12mm f/2.8")); + choices.insert(p_t(65535, "Zeiss Touit 32mm f/1.8")); choices.insert(p_t(65535, "Arax MC 35mm f/2.8 Tilt+Shift")); choices.insert(p_t(65535, "Arax MC 80mm f/2.8 Tilt+Shift")); choices.insert(p_t(65535, "Zenitar MF 16mm f/2.8 Fisheye M42")); @@ -512,20 +847,72 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { virtual std::string toString (Tag* t) { - int lensID = t->toInt(); - Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue"); - Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); - double maxApertureAtFocal = 0.; - double focalLength = 0.; - if( apertureTag ) - maxApertureAtFocal = pow(2.0, apertureTag->toDouble()/2.0); - if( focalLengthTag ) - focalLength = focalLengthTag->toDouble(); - return guess( lensID, focalLength, maxApertureAtFocal ); + int lensID = t->toInt(); + Tag *lensInfoTag = t->getParent()->getRoot()->findTag("LensInfo"); + Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue"); + Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); + double maxApertureAtFocal = 0.; + double focalLength = 0.; + if( apertureTag ) + maxApertureAtFocal = pow(2.0, apertureTag->toDouble()/2.0); + if( focalLengthTag ) + focalLength = focalLengthTag->toDouble(); + double *liArray = NULL; + if (lensInfoTag) + liArray = lensInfoTag->toDoubleArray(); + return guess( lensID, focalLength, maxApertureAtFocal, liArray); } }; SALensIDInterpreter saLensIDInterpreter; +class SALensID2Interpreter : public IntLensInterpreter< int > { + public: + SALensID2Interpreter () { // From EXIFTOOL database 'Sony.pm' V1.94 and 'Minolta' 2.04; + // Please do not remove entries on database synchronization, and avoid transferring "categories' header" types + choices.insert(p_t(00000, "Unknown E-Mount lens or other lens")); + choices.insert(p_t(00001, "Sony LA-EA1 Adapter")); + choices.insert(p_t(00002, "Sony LA-EA2 Adapter")); + choices.insert(p_t(00006, "Sony LA-EA4 Adapter")); + choices.insert(p_t(32784, "Sony E 16mm f/2.8")); + choices.insert(p_t(32785, "Sony E 18-55mm f/3.5-5.6 OSS")); + choices.insert(p_t(32786, "Sony E 55-210mm f/4.5-6.3 OSS")); + choices.insert(p_t(32787, "Sony E 18-200mm f/3.5-6.3 OSS")); + choices.insert(p_t(32788, "Sony E 30mm f/3.5 Macro")); + choices.insert(p_t(32789, "Sony E 24mm f/1.8 ZA")); + choices.insert(p_t(32790, "Sony E 50mm f/1.8 OSS")); + choices.insert(p_t(32791, "Sony E 16-70mm f/4 ZA OSS")); + choices.insert(p_t(32792, "Sony E 10-18mm f/4 OSS")); + choices.insert(p_t(32793, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); + choices.insert(p_t(32794, "Sony FE 35mm f/2.8 ZA")); + choices.insert(p_t(32795, "Sony FE 24-70mm f/4 ZA OSS")); + choices.insert(p_t(32797, "Sony E 18-200mm f/3.5-6.3 OSS LE")); + choices.insert(p_t(32798, "Sony E 20mm f/2.8")); + choices.insert(p_t(32799, "Sony E 35mm f/1.8 OSS")); + choices.insert(p_t(32807, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); + choices.insert(p_t(32808, "Sony FE 55mm f/1.8 ZA")); + choices.insert(p_t(32813, "Sony FE 28-70mm f/3.5-5.6 OSS")); + } + + virtual std::string toString (Tag* t) + { + int lensID = t->toInt(); + Tag *lensInfoTag = t->getParent()->getRoot()->findTag("LensInfo"); + Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue"); + Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); + double maxApertureAtFocal = 0.; + double focalLength = 0.; + if( apertureTag ) + maxApertureAtFocal = pow(2.0, apertureTag->toDouble()/2.0); + if( focalLengthTag ) + focalLength = focalLengthTag->toDouble(); + double *liArray = NULL; + if (lensInfoTag) + liArray = lensInfoTag->toDoubleArray(); + return guess( lensID, focalLength, maxApertureAtFocal, liArray); + } +}; +SALensID2Interpreter saLensID2Interpreter; + class MATeleconverterInterpreter : public ChoiceInterpreter { public: MATeleconverterInterpreter () { @@ -569,7 +956,7 @@ MAImageSizeInterpreter maImageSizeInterpreter; class SAQualityInterpreter2 : public ChoiceInterpreter { public: - SAQualityInterpreter2 () { + SAQualityInterpreter2 () { choices[0] = "Raw"; choices[2] = "cRAW"; choices[16] = "Extra fine"; @@ -581,9 +968,20 @@ class SAQualityInterpreter2 : public ChoiceInterpreter { }; SAQualityInterpreter2 saQualityInterpreter2; +class SAQualityInterpreter3 : public ChoiceInterpreter { + public: + SAQualityInterpreter3 () { + choices[2] = "RAW"; + choices[4] = "RAW + JPEG"; + choices[6] = "Fine"; + choices[7] = "Standard"; + } +}; +SAQualityInterpreter3 saQualityInterpreter3; + class SADriveMode : public ChoiceInterpreter { public: - SADriveMode () { + SADriveMode () { choices[0] = "Single Frame"; choices[1] = "Continuous High"; choices[4] = "Self-timer 10 sec"; @@ -596,9 +994,47 @@ class SADriveMode : public ChoiceInterpreter { }; SADriveMode saDriveMode; +class SADriveMode2 : public ChoiceInterpreter { + public: + SADriveMode2 () { + choices[0] = "Single Frame"; + choices[2] = "Continuous High"; + choices[4] = "Self-timer 10 sec"; + choices[5] = "Self-timer 2 sec, Mirror Lock-up"; + choices[7] = "Continuous Bracketing"; + choices[10] = "Remote Commander"; + choices[11] = "Continuous Self-timer"; + } +}; +SADriveMode2 saDriveMode2; + +class SADriveMode3 : public ChoiceInterpreter { + public: + SADriveMode3 () { + choices[0x10] = "Single Frame"; + choices[0x21] = "Continuous High"; + choices[0x22] = "Continuous Low"; + choices[0x30] = "Speed Priority Continuous"; + choices[0x51] = "Self-timer 10 sec"; + choices[0x52] = "Self-timer 2 sec, Mirror Lock-up"; + choices[0x71] = "Continuous Bracketing 0.3 EV"; + choices[0x75] = "Continuous Bracketing 0.7 EV"; + choices[0x91] = "White Balance Bracketing Low"; + choices[0x92] = "White Balance Bracketing High"; + choices[0xC0] = "Remote Commander"; + choices[0xD1] = "Continuous - HDR"; + choices[0xD2] = "Continuous - Multi Frame NR"; + choices[0xD3] = "Continuous - Handheld Night Shot"; + choices[0xD4] = "Continuous - Anti Motion Blur"; + choices[0xD5] = "Continuous - Sweep Panorama"; + choices[0xD6] = "Continuous - 3D Sweep Panorama"; + } +}; +SADriveMode3 saDriveMode3; + class SAFocusMode: public ChoiceInterpreter { - public: - SAFocusMode () { + public: + SAFocusMode () { choices[0] = "Manual"; choices[1] = "AF-S"; choices[2] = "AF-C"; @@ -609,6 +1045,31 @@ class SAFocusMode: public ChoiceInterpreter { }; SAFocusMode saFocusMode; +class SAFocusMode2: public ChoiceInterpreter { + public: + SAFocusMode2 () { + choices[0] = "Manual"; + choices[1] = "AF-S"; + choices[2] = "AF-C"; + choices[3] = "AF-A"; + choices[65535] = "n/a"; + } +}; +SAFocusMode2 saFocusMode2; + +class SAFocusModeSetting3: public ChoiceInterpreter { + public: + SAFocusModeSetting3 () { + choices[17] = "AF-S"; + choices[18] = "AF-C"; + choices[19] = "AF-A"; + choices[32] = "Manual"; + choices[48] = "DMF"; + choices[65535] = "n/a"; + } +}; +SAFocusModeSetting3 saFocusModeSetting3; + class SAAFMode: public ChoiceInterpreter { public: SAAFMode(){ @@ -635,9 +1096,20 @@ class SAAFAreaMode: public ChoiceInterpreter { }; SAAFAreaMode saAFAreaMode; -class SALocalAFAreaPoint: public ChoiceInterpreter { +class SAAFAreaMode2: public ChoiceInterpreter { public: - SALocalAFAreaPoint () { + SAAFAreaMode2 () { + choices[1] = "Wide"; + choices[2] = "Spot"; + choices[3] = "Local"; + choices[4] = "Flexible"; + } +}; +SAAFAreaMode2 saAFAreaMode2; + +class SAAFPointSelected: public ChoiceInterpreter { + public: + SAAFPointSelected () { choices[1] = "Center"; choices[2] = "Top"; choices[3] = "Top-Right"; @@ -651,17 +1123,102 @@ class SALocalAFAreaPoint: public ChoiceInterpreter { choices[11] = "Far Left"; } }; -SALocalAFAreaPoint saLocalAFAreaPoint; +SAAFPointSelected saAFPointSelected; -class SAMeteringMode: public ChoiceInterpreter { +class SACameraInfoAFPointSelected: public ChoiceInterpreter { public: - SAMeteringMode () { + SACameraInfoAFPointSelected () { + choices[0] = "Auto"; + choices[1] = "Center"; + choices[2] = "Top"; + choices[3] = "Upper-Right"; + choices[4] = "Right"; + choices[5] = "Lower-Right"; + choices[6] = "Bottom"; + choices[7] = "Lower-Left"; + choices[8] = "Left"; + choices[9] = "Upper-Left"; + choices[10] = "Far Right"; + choices[11] = "Far Left"; + choices[12] = "Upper-middle"; + choices[13] = "Near Right"; + choices[14] = "Lower-middle"; + choices[15] = "Near Left"; + } +}; +SACameraInfoAFPointSelected saCameraInfoAFPointSelected; + +class SACameraInfoAFPoint: public ChoiceInterpreter { + public: + SACameraInfoAFPoint () { + choices[0] = "Upper-Left"; + choices[1] = "Left"; + choices[2] = "Lower-Left"; + choices[3] = "Far Left"; + choices[4] = "Top (horizontal)"; + choices[5] = "Near Right"; + choices[6] = "Center (horizontal)"; + choices[7] = "Near Left"; + choices[8] = "Bottom (horizontal)"; + choices[9] = "Top (vertical)"; + choices[10] = "Center (vertical)"; + choices[11] = "Bottom (vertical)"; + choices[12] = "Far Right"; + choices[13] = "Upper-Right"; + choices[14] = "Right"; + choices[15] = "Lower-Right"; + choices[16] = "Upper-middle"; + choices[17] = "Lower-middle"; + choices[255] = "(none)"; + } +}; +SACameraInfoAFPoint saCameraInfoAFPoint; + +class SAAFPointSelected2: public ChoiceInterpreter { + public: + SAAFPointSelected2 () { + choices[1] = "Center"; + choices[2] = "Top"; + choices[3] = "Top-Right"; + choices[4] = "Right"; + choices[5] = "Bottom-Right"; + choices[6] = "Bottom"; + choices[7] = "Bottom-Left"; + choices[8] = "Left"; + choices[9] = "Top-Left"; + } +}; +SAAFPointSelected2 saAFPointSelected2; + +class SAMeteringMode0_3: public ChoiceInterpreter { + public: + SAMeteringMode0_3 () { + choices[0] = "Multi-segment"; + choices[2] = "Center-weighted Average"; + choices[3] = "Spot"; + } +}; +SAMeteringMode0_3 saMeteringMode0_3; + +class SAMeteringMode1_3: public ChoiceInterpreter { + public: + SAMeteringMode1_3 () { + choices[1] = "Multi-segment"; + choices[2] = "Center-weighted Average"; + choices[3] = "Spot"; + } +}; +SAMeteringMode1_3 saMeteringMode1_3; + +class SAMeteringMode1_4: public ChoiceInterpreter { + public: + SAMeteringMode1_4 () { choices[1] = "Multi-segment"; choices[2] = "Center-weighted Average"; choices[4] = "Spot"; } }; -SAMeteringMode saMeteringMode; +SAMeteringMode1_4 saMeteringMode1_4; class SADynamicRangeOptimizerMode: public ChoiceInterpreter { public: @@ -675,6 +1232,16 @@ class SADynamicRangeOptimizerMode: public ChoiceInterpreter { }; SADynamicRangeOptimizerMode saDynamicRangeOptimizerMode; +class SADynamicRangeOptimizerSetting: public ChoiceInterpreter { + public: + SADynamicRangeOptimizerSetting () { + choices[1] = "Off"; + choices[2] = "On (Auto)"; + choices[3] = "On (Manual)"; + } +}; +SADynamicRangeOptimizerSetting saDynamicRangeOptimizerSetting; + class SACreativeStyle: public ChoiceInterpreter { public: SACreativeStyle () { @@ -690,12 +1257,48 @@ class SACreativeStyle: public ChoiceInterpreter { choices[12] = "Clear"; choices[13] = "Deep"; choices[14] = "Light"; - choices[15] = "Autumn"; + choices[15] = "Autumn Leaves"; choices[16] = "Sepia"; } }; SACreativeStyle saCreativeStyle; +class SACreativeStyle2: public ChoiceInterpreter { + public: + SACreativeStyle2 () { + choices[1] = "Standard"; + choices[2] = "Vivid"; + choices[3] = "Portrait"; + choices[4] = "Landscape"; + choices[5] = "Sunset"; + choices[6] = "Night View/Portrait"; + choices[8] = "B&W"; + } +}; +SACreativeStyle2 saCreativeStyle2; + +class SACreativeStyleSetting: public ChoiceInterpreter { + public: + SACreativeStyleSetting () { + choices[16] = "Standard"; + choices[32] = "Vivid"; + choices[64] = "Portrait"; + choices[80] = "Landscape"; + choices[96] = "B&W"; + choices[160] = "Sunset"; + } +}; +SACreativeStyleSetting saCreativeStyleSetting; + +class SAFlashControl: public ChoiceInterpreter { + public: + SAFlashControl () { + choices[1] = "ADI Flash"; + choices[2] = "Pre-flash TTL"; + } +}; +SAFlashControl saFlashControl; + class SAFlashMode: public ChoiceInterpreter { public: SAFlashMode () { @@ -705,6 +1308,19 @@ class SAFlashMode: public ChoiceInterpreter { }; SAFlashMode saFlashMode; +class SAFlashMode2: public ChoiceInterpreter { + public: + SAFlashMode2 () { + choices[1] = "Flash Off"; + choices[16] = "Autoflash"; + choices[17] = "Fill-flash"; + choices[18] = "Slow Sync"; + choices[19] = "Rear Sync"; + choices[20] = "Wireless"; + } +}; +SAFlashMode2 saFlashMode2; + class SAExposureProgram: public ChoiceInterpreter { public: SAExposureProgram () { @@ -726,6 +1342,45 @@ class SAExposureProgram: public ChoiceInterpreter { }; SAExposureProgram saExposureProgram; +class SAExposureProgram2: public ChoiceInterpreter { + public: + SAExposureProgram2 () { + choices[1] = "Program AE"; + choices[2] = "Aperture-priority AE"; + choices[3] = "Shutter speed priority AE"; + choices[4] = "Manual"; + choices[5] = "Cont. Priority AE"; + choices[16] = "Auto"; + choices[17] = "Auto (no flash)"; + choices[18] = "Auto+"; + choices[49] = "Portrait"; + choices[50] = "Landscape"; + choices[51] = "Macro"; + choices[52] = "Sports"; + choices[53] = "Sunset"; + choices[54] = "Night view"; + choices[55] = "Night view/portrait"; + choices[56] = "Handheld Night Shot"; + choices[57] = "3D Sweep Panorama"; + choices[64] = "Auto 2"; + choices[65] = "Auto 2 (no flash)"; + choices[80] = "Sweep Panorama"; + choices[96] = "Anti Motion Blur"; + choices[128] = "Toy Camera"; + choices[129] = "Pop Color"; + choices[130] = "Posterization"; + choices[131] = "Posterization B/W"; + choices[132] = "Retro Photo"; + choices[133] = "High-key"; + choices[134] = "Partial Color Red"; + choices[135] = "Partial Color Green"; + choices[136] = "Partial Color Blue"; + choices[137] = "Partial Color Yellow"; + choices[138] = "High Contrast Monochrome"; + } +}; +SAExposureProgram2 saExposureProgram2; + class SARotation: public ChoiceInterpreter { public: SARotation () { @@ -741,12 +1396,25 @@ class SASonyImageSize: public ChoiceInterpreter { public: SASonyImageSize () { choices[1] = "Large"; - choices[2] = "Medium "; + choices[2] = "Medium"; choices[3] = "Small"; } }; SASonyImageSize saSonyImageSize; +class SASonyImageSize3: public ChoiceInterpreter { + public: + SASonyImageSize3 () { + choices[21] = "Large (3:2)"; + choices[22] = "Medium (3:2)"; + choices[23] = "Small (3:2)"; + choices[25] = "Large (16:9)"; + choices[26] = "Medium (16:9) "; + choices[27] = "Small (16:9)"; + } +}; +SASonyImageSize3 saSonyImageSize3; + class SAAspectRatio: public ChoiceInterpreter { public: SAAspectRatio () { @@ -756,6 +1424,15 @@ class SAAspectRatio: public ChoiceInterpreter { }; SAAspectRatio saAspectRatio; +class SAAspectRatio2: public ChoiceInterpreter { + public: + SAAspectRatio2 () { + choices[4] = "3:2"; + choices[8] = "16:9"; + } +}; +SAAspectRatio2 saAspectRatio2; + class SAExposureLevelIncrements: public ChoiceInterpreter { public: SAExposureLevelIncrements () { @@ -775,6 +1452,34 @@ class SAAFIlluminator: public ChoiceInterpreter { }; SAAFIlluminator saAFIlluminator; +class SAColorSpace1_2: public ChoiceInterpreter { + public: + SAColorSpace1_2 () { + choices[1] = "sRGB"; + choices[2] = "AdobeRGB"; + } +}; +SAColorSpace1_2 saColorSpace1_2; + +class SAColorSpace0_5: public ChoiceInterpreter { + public: + SAColorSpace0_5 () { + choices[0] = "sRGB"; + choices[1] = "AdobeRGB"; + choices[5] = "AdobeRGB"; + } +}; +SAColorSpace0_5 saColorSpace0_5; + +class SAColorSpace5_6: public ChoiceInterpreter { + public: + SAColorSpace5_6 () { + choices[5] = "AdobeRGB"; + choices[6] = "sRGB"; + } +}; +SAColorSpace5_6 saColorSpace5_6; + class SAReleaseModeInterpreter: public ChoiceInterpreter { public: SAReleaseModeInterpreter () { @@ -829,121 +1534,473 @@ class SAPictureEffectInterpreter: public ChoiceInterpreter { }; SAPictureEffectInterpreter saPictureEffectInterpreter; +class SACameraInfoFocusStatusInterpreter : public ChoiceInterpreter { + public: + SACameraInfoFocusStatusInterpreter() { + choices[0] = "Manual - Not confirmed (0)"; + choices[4] = "Manual - Not confirmed (4)"; + choices[16] = "AF-C - Confirmed"; + choices[24] = "AF-C - Not Confirmed"; + choices[64] = "AF-S - Confirmed"; + } +}; +SACameraInfoFocusStatusInterpreter saCameraInfoFocusStatusInterpreter; + +class SAExposureTimeInterpreter : public Interpreter { + public: + SAExposureTimeInterpreter () {} + virtual std::string toString (Tag* t){ + double a = t->toDouble(); + if(a>0){ + char buffer[10]; + sprintf (buffer, "%.4f", a); + return buffer; + }else + return "n/a"; + } + virtual double toDouble (Tag* t, int ofs){ + // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT + TagType astype = t->getType(); + int a; + if (astype==BYTE) + a = t->getValue()[ofs]; + else if (astype==SHORT) + a = (int)sget2 (t->getValue()+ofs, t->getOrder()); + + // Decode the value + if(a>0.) + return pow(2., 6.-(double(a)/8.)); + else + return 0.; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT + int a; + if (astype==INVALID || astype==AUTO) + astype = t->getType(); + if (astype==BYTE) + a = t->getValue()[ofs]; + else if (astype==SHORT) + a = (int)sget2 (t->getValue()+ofs, t->getOrder()); + + // Decode the value + if(a) + return int(powf(2.f, 6.f-(float(a)/8.f))+0.5f); + else + return 0; + } +}; +SAExposureTimeInterpreter saExposureTimeInterpreter; + +class SAFNumberInterpreter : public Interpreter { + public: + SAFNumberInterpreter () {} + virtual std::string toString (Tag* t){ + double a = double(t->toDouble()); + if(a){ + char buffer[10]; + sprintf (buffer, "%.1f", a/100. ); + return buffer; + }else + return "n/a"; + } + virtual double toDouble (Tag* t, int ofs){ + // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT + TagType astype = t->getType(); + int a; + if (astype==BYTE) + a = t->getValue()[ofs]; + else if (astype==SHORT) + a = (int)sget2 (t->getValue()+ofs, t->getOrder()); + + // Decode the value + if(a>0.) + return pow(2., (double(a)/8. - 1.) / 2.); + else + return 0.; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT + int a; + if (astype==INVALID || astype==AUTO) + astype = t->getType(); + if (astype==BYTE) + a = t->getValue()[ofs]; + else if (astype==SHORT) + a = (int)sget2 (t->getValue()+ofs, t->getOrder()); + + // Decode the value + if(a) + return int(powf(2.f, (float(a)/8.f - 1.f) / 2.f)+0.5f); + else + return 0; + } +}; +SAFNumberInterpreter saFNumberInterpreter; + +class SAISOSettingInterpreter : public Interpreter { + public: + SAISOSettingInterpreter () {} + virtual std::string toString (Tag* t){ + int a = t->toInt(); + if(a){ + char buffer[10]; + sprintf (buffer, "%d", a ); + return buffer; + }else + return "Auto"; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT + int a; + if (astype==INVALID || astype==AUTO) + astype = t->getType(); + if (astype==BYTE) + a = t->getValue()[ofs]; + else if (astype==SHORT) + a = (int)sget2 (t->getValue()+ofs, t->getOrder()); + + // Decode the value + if(a && a!=254) // 254 = 'Auto' for CameraSettings3, but we might say the same for CameraSettings & CameraSettings2 (?) + return int(expf((double(a)/8.f-6.f)*logf(2.f))*100.f +0.5f); + else + return 0; + } +}; +SAISOSettingInterpreter saISOSettingInterpreter; + +class SAExposureCompSetInterpreter : public Interpreter { + public: + SAExposureCompSetInterpreter () {} + virtual std::string toString (Tag* t){ + double a = t->toDouble(); + char buffer[10]; + sprintf (buffer, "%.2f", a ); + return buffer; + } + virtual double toDouble (Tag* t, int ofs){ + // Get the value + int a = t->getValue()[ofs]; + // Decode the value + return (double(a) - 128.) / 24.; + } +}; +SAExposureCompSetInterpreter saExposureCompSetInterpreter; + +class SAAFMicroAdjValueInterpreter : public Interpreter { + public: + SAAFMicroAdjValueInterpreter() {} + virtual std::string toString (Tag* t){ + char buffer[10]; + sprintf (buffer, "%d", t->getValue()[0] - 20); + return buffer; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + return t->getValue()[0] - 20; + } +}; +SAAFMicroAdjValueInterpreter saAFMicroAdjValueInterpreter; + +class SAAFMicroAdjModeInterpreter : public Interpreter { + public: + SAAFMicroAdjModeInterpreter() {} + virtual std::string toString (Tag* t){ + int a = t->getValue()[0] & 0x80; + if (a==0x80) + return "On"; + return "Off"; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + return (t->getValue()[0] & 0x80) == 0x80 ? 1 : 0; + } +}; + +SAAFMicroAdjModeInterpreter saAFMicroAdjModeInterpreter; + +class SAAFMicroAdjRegisteredLensesInterpreter : public Interpreter { + public: + SAAFMicroAdjRegisteredLensesInterpreter() {} + virtual std::string toString (Tag* t){ + char buffer[10]; + sprintf (buffer, "%d", t->getValue()[0] & 0x7f); + return buffer; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + return t->getValue()[0] & 0x7f; + } +}; +SAAFMicroAdjRegisteredLensesInterpreter saAFMicroAdjRegisteredLensesInterpreter; + +class SAFocusStatusInterpreter : public Interpreter { + public: + SAFocusStatusInterpreter () {} + virtual std::string toString (Tag* t){ + std::string retval; + int a = t->toInt(); + if (a == 0) + retval = "Not confirmed"; + else if (a == 4) + retval = "Not confirmed, Tracking"; + else { + if (a & 1) + retval = "Confirmed"; + if (a & 2) { + if (!retval.empty()) + retval += ", "; + retval += "Failed"; + } + if (a & 4) + if (!retval.empty()) + retval += ", "; + retval += "Tracking"; + } + return retval; + } +}; +SAFocusStatusInterpreter saFocusStatusInterpreter; + +class SAColorTemperatureSettingInterpreter : public Interpreter { + public: + SAColorTemperatureSettingInterpreter () {} + virtual std::string toString (Tag* t){ + char buffer[10]; + sprintf (buffer, "%d", t->toInt()); + return buffer; + } + virtual int toInt (Tag* t, int ofs, TagType astype){ + int a; + if (astype==INVALID || astype==AUTO) + astype = t->getType(); + if (astype==BYTE) + a = t->getValue()[ofs]; + else if (astype==SHORT) + a = (int)sget2 (t->getValue()+ofs, t->getOrder()); + return a * 100; + } +}; +SAColorTemperatureSettingInterpreter saColorTemperatureSettingInterpreter; + const TagAttrib minoltaAttribs[] = { - {0, 1, 0, 0, 0x0000, "MakerNoteVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x0001, "MinoltaCameraSettingsOld", &stdInterpreter}, - {0, 1, 0, 0, 0x0003, "MinoltaCameraSettings", &stdInterpreter}, - {0, 1, 0, 0, 0x0004, "MinoltaCameraSettings7D", &stdInterpreter}, - {0, 1, 0, 0, 0x0018, "ImageStabilization", &stdInterpreter}, - {0, 1, 0, 0, 0x0040, "CompressedImageSize", &stdInterpreter}, - {1, 1, 0, 0, 0x0081, "PreviewImage", &stdInterpreter}, - {1, 1, 0, 0, 0x0088, "PreviewImageStart", &stdInterpreter}, - {1, 1, 0, 0, 0x0089, "PreviewImageLength", &stdInterpreter}, - {0, 1, 0, 0, 0x0100, "SceneMode", &saSceneModeInterpreter}, - {0, 1, 0, 0, 0x0101, "ColorMode", &saColorModeInterpreter}, - {0, 1, 0, 0, 0x0102, "MinoltaQuality", &maQualityInterpreter}, - {0, 1, 0, 0, 0x0103, "MinoltaImageSize", &maImageSizeInterpreter}, - {0, 1, 0, 0, 0x0104, "FlashExposureComp", &stdInterpreter}, - {0, 1, 0, 0, 0x0105, "Teleconverter", &maTeleconverterInterpreter}, - {0, 1, 0, 0, 0x0107, "ImageStabilization", &saOnOffInterpreter}, - {0, 1, 0, 0, 0x010a, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, 1, 0, 0, 0x010b, "ColorTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0x010c, "LensID", &saLensIDInterpreter}, - {0, 1, 0, 0, 0x0113, "ImageStabilization", &saOnOffInterpreter}, - {0, 1, 0, 0, 0x0114, "MinoltaCameraSettings", &stdInterpreter}, - {1, 1, 0, 0, 0x0e00, "PrintIM", &stdInterpreter}, - {0, 1, 0, 0, 0x0f00, "MinoltaCameraSettings2", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, + {0, AC_WRITE, 0, 0, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, 0, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, 0, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, 0, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib sonyAttribs[] = { - {0, 1, 0, 0, 0x0102, "Quality", &maQualityInterpreter}, - {0, 1, 0, 0, 0x0104, "FlashExposureComp",&stdInterpreter}, - {0, 1, 0, 0, 0x0106, "TeleConverter", &maTeleconverterInterpreter}, - {0, 1, 0, sonyCameraSettingsAttribs, 0x0114, "SonyCameraSettings",&stdInterpreter}, - {0, 1, 0, 0, 0x0115, "WhiteBalance",&saWhiteBalanceInterpreter}, - {1, 1, 0, 0, 0x0e00, "PrintIM", &stdInterpreter}, - {1, 1, 0, 0, 0x2001, "PreviewImage", &stdInterpreter}, - {0, 1, 0, 0, 0x2009, "HighISONoiseReduction", &stdInterpreter}, - {0, 1, 0, 0, 0x200a, "AutoHDR", &stdInterpreter}, - {0, 1, 0, 0, 0x200b, "MultiFrameNoiseReduction", &stdInterpreter}, - {0, 1, 0, 0, 0x200e, "PictureEffect", &saPictureEffectInterpreter}, - {0, 1, 0, 0, 0x2011, "VignettingCorrection", &stdInterpreter}, - {0, 1, 0, 0, 0x2012, "LateralChromaticAberration", &stdInterpreter}, - {0, 1, 0, 0, 0x2013, "DistortionCorrection", &stdInterpreter}, - {0, 1, 0, 0, 0xb020, "ColorReproduction", &stdInterpreter}, - {0, 1, 0, 0, 0xb021, "ColorTemperature", &stdInterpreter}, - {0, 1, 0, 0, 0xb022, "ColorCompensationFilter", &stdInterpreter}, - {0, 1, 0, 0, 0xb023, "SceneMode", &saSceneModeInterpreter}, - {0, 1, 0, 0, 0xb024, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, 1, 0, 0, 0xb025, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, - {0, 1, 0, 0, 0xb026, "ImageStabilization", &saOnOffInterpreter}, - {0, 1, 0, 0, 0xb027, "LensID", &saLensIDInterpreter}, - {0, 1, 0, minoltaAttribs, 0xb028, "MinoltaMakerNote", &stdInterpreter}, - {0, 1, 0, 0, 0xb029, "ColorMode", &saColorModeInterpreter}, - {0, 1, 0, 0, 0xb040, "Macro", &saOnOffInterpreter}, - {0, 1, 0, 0, 0xb041, "ExposureMode", &saExposureModeInterpreter}, - {0, 1, 0, 0, 0xb042, "FocusMode", &saFocusMode}, - {0, 1, 0, 0, 0xb043, "AFMode", &saAFMode}, - {0, 1, 0, 0, 0xb044, "AFIlluminator", &saAFIlluminator}, - {0, 1, 0, 0, 0xb047, "Quality", &saQualityInterpreter}, - {0, 1, 0, 0, 0xb048, "FlashLevel", &stdInterpreter}, - {0, 1, 0, 0, 0xb049, "ReleaseMode",&saReleaseModeInterpreter}, - {0, 1, 0, 0, 0xb04a, "SequenceNumber", &stdInterpreter}, - {0, 1, 0, 0, 0xb04b, "AntiBlur", &saAntiBlurInterpreter}, - {0, 1, 0, 0, 0xb04e, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, 1, 0, 0, 0xb04f, "DynamicRangeOptimizer", &stdInterpreter}, - {0, 1, 0, 0, 0xb052, "IntelligentAuto", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, sonyCameraInfoAttribs, 0x0010, AUTO, "CameraInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0102, AUTO, "Quality", &maQualityInterpreter}, + {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, sonyCameraSettingsAttribs, 0x0114, AUTO, "SonyCameraSettings",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WhiteBalance",&saWhiteBalanceInterpreter}, + {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {1, AC_WRITE, 0, 0, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, + {0, AC_WRITE, 0, 0, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, + {0, AC_WRITE, 0, 0, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, 0, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, 0, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, + {0, AC_WRITE, 0, 0, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, minoltaAttribs, 0xb028, AUTO, "MinoltaMakerNote", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, 0, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0xb042, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, 0, 0xb043, AUTO, "AFMode", &saAFMode}, + {0, AC_WRITE, 0, 0, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, 0, 0xb047, AUTO, "Quality", &saQualityInterpreter}, + {0, AC_WRITE, 0, 0, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb049, AUTO, "ReleaseMode",&saReleaseModeInterpreter}, + {0, AC_WRITE, 0, 0, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, + {0, AC_WRITE, 0, 0, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, + {0, AC_WRITE, 0, 0, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, + {0, AC_WRITE, 0, sonyTag9405Attribs, 0x9405, AUTO, "Tag9405", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + +const TagAttrib sonyTag9405Attribs[] = { + {0, AC_WRITE, 0, 0, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here + {0, AC_WRITE, 0, 0, 0x005e, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0060, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0062, SHORT, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here + {0, AC_WRITE, 0, 0, 0x0604, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0605, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0608, SHORT, "LensType", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + +const TagAttrib sonyCameraInfoAttribs[] = { + {0, AC_WRITE, 0, 0, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, + {0, AC_WRITE, 0, 0, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, + {0, AC_WRITE, 0, 0, 29, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, 0, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + +const TagAttrib sonyCameraInfo2Attribs[] = { + {0, AC_WRITE, 0, 0, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, + {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, + {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib sonyCameraSettingsAttribs[]={ - {0, 1, 0, 0, 4, "DriveMode", &saDriveMode}, - {0, 1, 0, 0, 6, "WhiteBalanceFineTune",&stdInterpreter}, - {0, 1, 0, 0, 16, "FocusMode",&saFocusMode}, - {0, 1, 0, 0, 17, "AFAreaMode",&saAFAreaMode}, - {0, 1, 0, 0, 18, "LocalAFAreaPoint", &saLocalAFAreaPoint}, - {0, 1, 0, 0, 21, "MeteringMode",&saMeteringMode}, - {0, 1, 0, 0, 22, "ISOSetting",&stdInterpreter}, - {0, 1, 0, 0, 24, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, 1, 0, 0, 25, "DynamicRangeOptimizerLevel",&stdInterpreter}, - {0, 1, 0, 0, 26, "CreativeStyle",&saCreativeStyle}, - {0, 1, 0, 0, 28, "Sharpness",&stdInterpreter}, - {0, 1, 0, 0, 29, "Contrast",&stdInterpreter}, - {0, 1, 0, 0, 30, "Saturation",&stdInterpreter}, - {0, 1, 0, 0, 31, "ZoneMatchingValue",&stdInterpreter}, - {0, 1, 0, 0, 34, "Brightness",&stdInterpreter}, - {0, 1, 0, 0, 35, "FlashMode",&saFlashMode}, - {0, 1, 0, 0, 40, "PrioritySetupShutterRelease",&stdInterpreter}, - {0, 1, 0, 0, 41, "AFIlluminator",&saAFIlluminator}, - {0, 1, 0, 0, 42, "AFWithShutter",&saOnOffInterpreter}, - {0, 1, 0, 0, 43, "LongExposureNoiseReduction",&saOnOffInterpreter}, - {0, 1, 0, 0, 44, "HighISONoiseReduction",&stdInterpreter}, - {0, 1, 0, 0, 45, "ImageStyle",&saImageStyleInterpreter}, - {0, 1, 0, 0, 60, "ExposureProgram",&saExposureProgram}, - {0, 1, 0, 0, 61, "ImageStabilization",&saOnOffInterpreter}, - {0, 1, 0, 0, 63, "Rotation",&saRotation}, - {0, 1, 0, 0, 84, "SonyImageSize",&saSonyImageSize}, - {0, 1, 0, 0, 85, "AspectRatio",&saAspectRatio}, - {0, 1, 0, 0, 86, "Quality",&saQualityInterpreter2}, - {0, 1, 0, 0, 88, "ExposureLevelIncrements",&saExposureLevelIncrements}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, 0, 4, AUTO, "DriveMode", &saDriveMode}, + {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceFineTune",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 16, AUTO, "FocusModeSetting",&saFocusMode}, + {0, AC_WRITE, 0, 0, 17, AUTO, "AFAreaMode",&saAFAreaMode}, + {0, AC_WRITE, 0, 0, 18, AUTO, "AFPointSelected", &saAFPointSelected}, + {0, AC_WRITE, 0, 0, 21, AUTO, "MeteringMode",&saMeteringMode1_4}, + {0, AC_WRITE, 0, 0, 22, AUTO, "ISOSetting",&saISOSettingInterpreter}, + {0, AC_WRITE, 0, 0, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, 0, 25, AUTO, "DynamicRangeOptimizerLevel",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 26, AUTO, "CreativeStyle",&saCreativeStyle}, + {0, AC_WRITE, 0, 0, 28, AUTO, "Sharpness",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 29, AUTO, "Contrast",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 30, AUTO, "Saturation",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 31, AUTO, "ZoneMatchingValue",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 34, AUTO, "Brightness",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode",&saFlashMode}, + {0, AC_WRITE, 0, 0, 40, AUTO, "PrioritySetupShutterRelease",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 41, AUTO, "AFIlluminator",&saAFIlluminator}, + {0, AC_WRITE, 0, 0, 42, AUTO, "AFWithShutter",&saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 43, AUTO, "LongExposureNoiseReduction",&saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 44, AUTO, "HighISONoiseReduction",&saHighISONoiseReduction3}, + {0, AC_WRITE, 0, 0, 45, AUTO, "ImageStyle",&saImageStyleInterpreter}, + {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram",&saExposureProgram}, + {0, AC_WRITE, 0, 0, 61, AUTO, "ImageStabilization",&saOnOffInterpreter}, + {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation",&saRotation}, + {0, AC_WRITE, 0, 0, 77, AUTO, "FocusMode",&saFocusMode}, + {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus",&saFocusStatusInterpreter}, + {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize",&saSonyImageSize}, + {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio",&saAspectRatio}, + {0, AC_WRITE, 0, 0, 86, AUTO, "Quality",&saQualityInterpreter2}, + {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements",&saExposureLevelIncrements}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; const TagAttrib sonyCameraSettingsAttribs2[]={ - {0, 1, 0, 0, 16, "FocusMode",&saFocusMode}, - {0, 1, 0, 0, 17, "AFAreaMode",&saAFAreaMode}, - {0, 1, 0, 0, 18, "LocalAFAreaPoint",&saLocalAFAreaPoint}, - {0, 1, 0, 0, 19, "MeteringMode",&saMeteringMode}, - {0, 1, 0, 0, 20, "ISOSetting",&stdInterpreter}, - {0, 1, 0, 0, 22, "DynamicRangeOptimizerMode",&saDynamicRangeOptimizerMode}, - {0, 1, 0, 0, 23, "DynamicRangeOptimizerLevel",&stdInterpreter}, - {0, 1, 0, 0, 24, "CreativeStyle",&saCreativeStyle}, - {0, 1, 0, 0, 25, "Sharpness",&stdInterpreter}, - {0, 1, 0, 0, 26, "Contrast",&stdInterpreter}, - {0, 1, 0, 0, 27, "Saturation",&stdInterpreter}, - {0, 1, 0, 0, 35, "FlashMode",&saFlashMode}, - {0, 1, 0, 0, 60, "ExposureProgram",&saExposureProgram}, - {0, 1, 0, 0, 63, "Rotation",&saRotation}, - {0, 1, 0, 0, 84, "SonyImageSize",&saSonyImageSize}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, 0, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, 0, 15, AUTO, "FocusMode",&saFocusMode2}, + {0, AC_WRITE, 0, 0, 16, AUTO, "AFAreaMode",&saAFAreaMode}, + {0, AC_WRITE, 0, 0, 17, AUTO, "AFPointSelected",&saAFPointSelected2}, + {0, AC_WRITE, 0, 0, 19, AUTO, "MeteringMode",&saMeteringMode1_4}, + {0, AC_WRITE, 0, 0, 20, AUTO, "ISOSetting",&saISOSettingInterpreter}, + {0, AC_WRITE, 0, 0, 22, AUTO, "DynamicRangeOptimizerMode",&saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, 0, 23, AUTO, "DynamicRangeOptimizerLevel",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 24, AUTO, "CreativeStyle",&saCreativeStyle2}, + {0, AC_WRITE, 0, 0, 25, AUTO, "Sharpness",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 26, AUTO, "Contrast",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 27, AUTO, "Saturation",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode",&saFlashMode}, + {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction",&saHighISONoiseReduction4}, + {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram",&saExposureProgram}, + {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation",&saRotation}, + {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus",&saFocusStatusInterpreter}, + {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize",&saSonyImageSize}, + {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio",&saAspectRatio}, + {0, AC_WRITE, 0, 0, 86, AUTO, "Quality",&saQualityInterpreter2}, + {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements",&saExposureLevelIncrements}, + {0, AC_WRITE, 0, 0,126, AUTO, "DriveMode", &saDriveMode2}, + {0, AC_WRITE, 0, 0,131, AUTO, "ColorSpace", &saColorSpace5_6}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + +const TagAttrib sonyCameraSettingsAttribs3[]={ + {0, AC_WRITE, 0, 0, 0, AUTO, "ShutterSpeedSetting",&saExposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureSetting",&saFNumberInterpreter}, + {0, AC_WRITE, 0, 0, 2, AUTO, "ISOSetting",&saISOSettingInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "ExposureCompensationSet",&saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, 0, 3, AUTO, "DriveModeSetting",&saDriveMode3}, + {0, AC_WRITE, 0, 0, 5, AUTO, "ExposureProgram",&saExposureProgram2}, + {0, AC_WRITE, 0, 0, 6, AUTO, "FocusModeSetting",&saFocusModeSetting3}, + {0, AC_WRITE, 0, 0, 7, AUTO, "MeteringMode",&saMeteringMode1_3}, + {0, AC_WRITE, 0, 0, 9, AUTO, "SonyImageSize",&saSonyImageSize3}, + {0, AC_WRITE, 0, 0, 10, AUTO, "AspectRatio",&saAspectRatio2}, + {0, AC_WRITE, 0, 0, 11, AUTO, "Quality",&saQualityInterpreter3}, + {0, AC_WRITE, 0, 0, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, + {0, AC_WRITE, 0, 0, 14, AUTO, "ColorSpace", &saColorSpace1_2}, + {0, AC_WRITE, 0, 0, 15, AUTO, "CreativeStyleSetting",&saCreativeStyleSetting}, + {0, AC_WRITE, 0, 0, 16, AUTO, "Contrast",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 17, AUTO, "Saturation",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 18, AUTO, "Sharpness",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 22, AUTO, "WhiteBalance",&saWhiteBalanceSettingInterpreter}, + {0, AC_WRITE, 0, 0, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, 0, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 32, AUTO, "FlashMode",&saFlashMode2}, + {0, AC_WRITE, 0, 0, 33, AUTO, "FlashControl",&saFlashControl}, + {0, AC_WRITE, 0, 0, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, 0, 36, AUTO, "AFAreaMode",&saAFAreaMode2}, + {0, AC_WRITE, 0, 0, 37, AUTO, "LongExposureNoiseReduction",&saOnOffInterpreter2}, + {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction",&saHighISONoiseReduction5}, + {0, AC_WRITE, 0, 0, 39, AUTO, "SmileShutterMode",&saSmileShutterMode}, + {0, AC_WRITE, 0, 0, 40, AUTO, "RedEyeReduction",&saOnOffInterpreter2}, + {0, AC_WRITE, 0, 0, 45, AUTO, "HDRSetting",&saOnOffInterpreter3}, + {0, AC_WRITE, 0, 0, 46, AUTO, "HDRLevel",&saHDRLevel}, + {0, AC_WRITE, 0, 0, 47, AUTO, "ViewingMode",&saViewingMode}, + {0, AC_WRITE, 0, 0, 48, AUTO, "FaceDetection",&saOnOffInterpreter2}, + {0, AC_WRITE, 0, 0, 49, AUTO, "SmileShutter",&saOnOffInterpreter2}, + {0, AC_WRITE, 0, 0, 50, AUTO, "SweepPanoramaSize",&saSweepPanoramaSize}, + {0, AC_WRITE, 0, 0, 51, AUTO, "SweepPanoramaDirection",&saSweepPanoramaDirection}, + {0, AC_WRITE, 0, 0, 52, AUTO, "DriveMode",&saDriveMode3}, + {0, AC_WRITE, 0, 0, 53, AUTO, "MultiFrameNoiseReduction",&saOnOffInterpreter4}, + {0, AC_WRITE, 0, 0, 54, AUTO, "LiveViewAFSetting",&saLiveViewAFSetting}, + {0, AC_WRITE, 0, 0, 56, AUTO, "PanoramaSize3D",&saPanoramaSize3D}, + {0, AC_WRITE, 0, 0, 131, AUTO, "AFButtonPressed",&saNoYesInterpreter}, + {0, AC_WRITE, 0, 0, 132, AUTO, "LiveViewMetering",&saLiveViewMetering}, + {0, AC_WRITE, 0, 0, 133, AUTO, "ViewingMode2",&saViewingMode}, + {0, AC_WRITE, 0, 0, 134, AUTO, "AELock",&saOnOffInterpreter5}, + {0, AC_WRITE, 0, 0, 135, AUTO, "FlashAction",&saFlashAction}, + {0, AC_WRITE, 0, 0, 139, AUTO, "LiveViewFocusMode",&saLiveViewFocusMode}, + {0, AC_WRITE, 0, 0, 153, AUTO, "LensMount",&saLensMount}, + {0, AC_WRITE, 0, 0, 643, AUTO, "AFButtonPressed",&saNoYesInterpreter}, + {0, AC_WRITE, 0, 0, 644, AUTO, "LiveViewMetering",&saLiveViewMetering}, + {0, AC_WRITE, 0, 0, 645, AUTO, "ViewingMode2",&saViewingMode}, + {0, AC_WRITE, 0, 0, 646, AUTO, "AELock",&saOnOffInterpreter5}, + {0, AC_WRITE, 0, 0, 647, AUTO, "FlashAction",&saFlashAction}, + {0, AC_WRITE, 0, 0, 651, AUTO, "LiveViewFocusMode",&saLiveViewFocusMode}, + {0, AC_WRITE, 0, 0, 1015, SHORT, "LensType2",&saLensID2Interpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; + +/*const TagAttrib sonyDNGMakerNote[]={ + {0, AC_WRITE, 0, 0, 0x7200, AUTO, "SonyOffset", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x7201, AUTO, "SonyLength", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x7221, AUTO, "SonyKey", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};*/ + } #endif diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 2d8d96306..dc80c8f06 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -392,173 +392,177 @@ class UTF8BinInterpreter : public Interpreter { UTF8BinInterpreter utf8BinInterpreter; const TagAttrib exifAttribs[] = { - {0, 2, 0, 0, 0x0100, "ImageWidth", &stdInterpreter}, - {0, 2, 0, 0, 0x0101, "ImageHeight", &stdInterpreter}, - {0, 2, 0, 0, 0x0102, "BitsPerSample", &stdInterpreter}, - {0, 2, 0, 0, 0x0103, "Compression", &compressionInterpreter}, - {0, 1, 0, 0, 0x828d, "CFAPatternDim", &stdInterpreter}, - {0, 1, 0, 0, 0x828e, "CFAPattern", &cfaInterpreter}, - {0, 1, 0, 0, 0x829A, "ExposureTime", &exposureTimeInterpreter}, - {0, 1, 0, 0, 0x829D, "FNumber", &fNumberInterpreter}, - {0, 1, 0, 0, 0x8822, "ExposureProgram", &exposureProgramInterpreter}, - {0, 1, 0, 0, 0x8824, "SpectralSensitivity", &stdInterpreter}, - {0, 1, 0, 0, 0x8827, "ISOSpeedRatings", &stdInterpreter}, - {0, 1, 0, 0, 0x8828, "OECF", &stdInterpreter}, - {0, 1, 0, 0, 0x9000, "ExifVersion", &stdInterpreter}, - {0, 1, 0, 0, 0x9003, "DateTimeOriginal", &stdInterpreter}, - {0, 1, 0, 0, 0x9004, "DateTimeDigitized", &stdInterpreter}, - {0, 2, 0, 0, 0x9101, "ComponentsConfiguration", &stdInterpreter}, - {0, 2, 0, 0, 0x9102, "CompressedBitsPerPixel", &stdInterpreter}, - {0, 1, 0, 0, 0x9201, "ShutterSpeedValue", &shutterSpeedInterpreter}, - {0, 1, 0, 0, 0x9202, "ApertureValue", &apertureInterpreter}, - {0, 1, 0, 0, 0x9203, "BrightnessValue", &stdInterpreter}, - {0, 1, 0, 0, 0x9204, "ExposureBiasValue", &exposureBiasInterpreter}, - {0, 1, 0, 0, 0x9205, "MaxApertureValue", &apertureInterpreter}, - {0, 1, 0, 0, 0x9206, "SubjectDistance", &stdInterpreter}, - {0, 1, 0, 0, 0x9207, "MeteringMode", &meteringModeInterpreter}, - {0, 1, 0, 0, 0x9208, "LightSource", &lightSourceInterpreter}, - {0, 1, 0, 0, 0x9209, "Flash", &flashInterpreter}, - {0, 1, 0, 0, 0x920A, "FocalLength", &focalLengthInterpreter}, - {0, 1, 0, 0, 0x9214, "SubjectArea", &stdInterpreter}, - {0, 0, 0, 0, 0x9216, "TIFFEPSStandardID", &stdInterpreter}, - {0, 1, 0, 0, 0x9217, "SensingMethod", &stdInterpreter}, - {0, 1, 0, 0, 0x927C, "MakerNote", &stdInterpreter}, - {0, 1, 1, 0, 0x9286, "UserComment", &userCommentInterpreter}, - {0, 1, 0, 0, 0x9290, "SubSecTime", &stdInterpreter}, - {0, 1, 0, 0, 0x9291, "SubSecTimeOriginal", &stdInterpreter}, - {0, 1, 0, 0, 0x9292, "SubSecTimeDigitized", &stdInterpreter}, - {0, 2, 0, 0, 0xA000, "FlashpixVersion", &stdInterpreter}, - {0, 0, 0, 0, 0xA001, "ColorSpace", &colorSpaceInterpreter}, - {0, 2, 0, 0, 0xA002, "PixelXDimension", &stdInterpreter}, - {0, 2, 0, 0, 0xA003, "PixelYDimension", &stdInterpreter}, - {1, 0, 0, 0, 0xA004, "RelatedSoundFile", &stdInterpreter}, - {0, 2, 0, iopAttribs, 0xA005, "Interoperability", &stdInterpreter}, // do not enable, as it causes trouble with FUJI files - {0, 1, 0, 0, 0xA20B, "FlashEnergy", &stdInterpreter}, - {0, 1, 0, 0, 0xA20C, "SpatialFrequencyResponse", &stdInterpreter}, - {0, 1, 0, 0, 0xA20E, "FocalPlaneXResolution", &stdInterpreter}, - {0, 1, 0, 0, 0xA20F, "FocalPlaneYResolution", &stdInterpreter}, - {0, 1, 0, 0, 0xA210, "FocalPlaneResolutionUnit", &stdInterpreter}, - {0, 1, 0, 0, 0xA214, "SubjectLocation", &stdInterpreter}, - {0, 1, 0, 0, 0xA215, "ExposureIndex", &stdInterpreter}, - {0, 1, 0, 0, 0xA217, "SensingMethod", &stdInterpreter}, - {0, 1, 0, 0, 0xA300, "FileSource", &stdInterpreter}, - {0, 1, 0, 0, 0xA301, "SceneType", &stdInterpreter}, - {0, 0, 0, 0, 0xA302, "CFAPattern", &cfaInterpreter}, - {0, 1, 0, 0, 0xA401, "CustomRendered", &stdInterpreter}, - {0, 1, 0, 0, 0xA402, "ExposureMode", &exposureModeInterpreter}, - {0, 1, 0, 0, 0xA403, "WhiteBalance", &whiteBalanceInterpreter}, - {0, 1, 0, 0, 0xA404, "DigitalZoomRatio", &stdInterpreter}, - {0, 1, 0, 0, 0xA405, "FocalLengthIn35mmFilm", &stdInterpreter}, - {0, 1, 0, 0, 0xA406, "SceneCaptureType", &sceneCaptureInterpreter}, - {0, 1, 0, 0, 0xA407, "GainControl", &gainControlInterpreter}, - {0, 1, 0, 0, 0xA408, "Contrast", &contrastInterpreter}, - {0, 1, 0, 0, 0xA409, "Saturation", &saturationInterpreter}, - {0, 1, 0, 0, 0xA40A, "Sharpness", &sharpnessInterpreter}, - {0, 1, 0, 0, 0xA40B, "DeviceSettingDescription", &stdInterpreter}, - {0, 1, 0, 0, 0xA40C, "SubjectDistanceRange", &stdInterpreter}, - {0, 1, 0, 0, 0xA420, "ImageUniqueID", &stdInterpreter}, - {0, 1, 0, 0, 0xA431, "SerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0xA432, "LensInfo", &stdInterpreter}, - {0, 1, 0, 0, 0xA433, "LensMake", &stdInterpreter}, - {0, 1, 0, 0, 0xA434, "LensModel", &stdInterpreter}, - {0, 1, 0, 0, 0xA435, "LensSerialNumber", &stdInterpreter}, - {0, 1, 0, 0, 0xc630, "DNGLensInfo", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL }}; + {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, 0, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, + {0, AC_WRITE, 0, 0, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, + {0, AC_WRITE, 0, 0, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, + {0, AC_WRITE, 0, 0, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x8828, AUTO, "OECF", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, + {0, AC_WRITE, 0, 0, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, 0, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, + {0, AC_WRITE, 0, 0, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, 0, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, + {0, AC_WRITE, 0, 0, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, + {0, AC_WRITE, 0, 0, 0x9209, AUTO, "Flash", &flashInterpreter}, + {0, AC_WRITE, 0, 0, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, + {0, AC_WRITE, 0, 0, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x927C, AUTO, "MakerNote", &stdInterpreter}, + {0, AC_WRITE, 1, 0, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, + {0, AC_WRITE, 0, 0, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, + {0, AC_SYSTEM, 0, 0, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, + {1, AC_DONTWRITE, 0, 0, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, + {0, AC_SYSTEM, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, // do not enable, as it causes trouble with FUJI files + {0, AC_WRITE, 0, 0, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA300, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA301, AUTO, "SceneType", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, 0, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, + {0, AC_WRITE, 0, 0, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, + {0, AC_WRITE, 0, 0, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, + {0, AC_WRITE, 0, 0, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, + {0, AC_WRITE, 0, 0, 0xA408, AUTO, "Contrast", &contrastInterpreter}, + {0, AC_WRITE, 0, 0, 0xA409, AUTO, "Saturation", &saturationInterpreter}, + {0, AC_WRITE, 0, 0, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, + {0, AC_WRITE, 0, 0, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA432, AUTO, "LensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA433, AUTO, "LensMake", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA434, AUTO, "LensModel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }}; const TagAttrib gpsAttribs[] = { - {0, 1, 0, 0, 0x0000, "GPSVersionID", &stdInterpreter}, - {0, 1, 0, 0, 0x0001, "GPSLatitudeRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0002, "GPSLatitude", &stdInterpreter}, - {0, 1, 0, 0, 0x0003, "GPSLongitudeRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0004, "GPSLongitude", &stdInterpreter}, - {0, 1, 0, 0, 0x0005, "GPSAltitudeRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0006, "GPSAltitude", &stdInterpreter}, - {0, 1, 0, 0, 0x0007, "GPSTimeStamp", &stdInterpreter}, - {0, 1, 0, 0, 0x0008, "GPSSatelites", &stdInterpreter}, - {0, 1, 0, 0, 0x0009, "GPSStatus", &stdInterpreter}, - {0, 1, 0, 0, 0x000a, "GPSMeasureMode", &stdInterpreter}, - {0, 1, 0, 0, 0x000b, "GPSDOP", &stdInterpreter}, - {0, 1, 0, 0, 0x000c, "GPSSpeedRef", &stdInterpreter}, - {0, 1, 0, 0, 0x000d, "GPSSpeed", &stdInterpreter}, - {0, 1, 0, 0, 0x000e, "GPSTrackRef", &stdInterpreter}, - {0, 1, 0, 0, 0x000f, "GPSTrack", &stdInterpreter}, - {0, 1, 0, 0, 0x0010, "GPSImgDirectionRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0011, "GPSImgDirection", &stdInterpreter}, - {0, 1, 0, 0, 0x0012, "GPSMapDatum", &stdInterpreter}, - {0, 1, 0, 0, 0x0013, "GPSDestLatitudeRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0014, "GPSDestLatitude", &stdInterpreter}, - {0, 1, 0, 0, 0x0015, "GPSDestLongitudeRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0016, "GPSDestLongitude", &stdInterpreter}, - {0, 1, 0, 0, 0x0017, "GPSDestBearingRef", &stdInterpreter}, - {0, 1, 0, 0, 0x0018, "GPSDestBearing", &stdInterpreter}, - {0, 1, 0, 0, 0x0019, "GPSDestDistanceRef", &stdInterpreter}, - {0, 1, 0, 0, 0x001a, "GPSDestDistance", &stdInterpreter}, - {0, 1, 0, 0, 0x001b, "GPSProcessingMethod", &stdInterpreter}, - {0, 1, 0, 0, 0x001c, "GPSAreaInformation", &stdInterpreter}, - {0, 1, 0, 0, 0x001d, "GPSDateStamp", &stdInterpreter}, - {0, 1, 0, 0, 0x001e, "GPSDifferential", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL }}; + {0, AC_WRITE, 0, 0, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }}; const TagAttrib iopAttribs[] = { - {0, 1, 0, 0, 0x0001, "InteroperabilityIndex", &stdInterpreter}, - {0, 1, 0, 0, 0x0002, "InteroperabilityVersion", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL }}; + {0, AC_WRITE, 0, 0, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }}; const TagAttrib ifdAttribs[] = { - {0, 2, 0, 0, 0x0017, "PanaISO", &stdInterpreter}, - {0, 2, 0, 0, 0x0100, "ImageWidth", &stdInterpreter}, - {0, 2, 0, 0, 0x0101, "ImageHeight", &stdInterpreter}, - {0, 2, 0, 0, 0x0102, "BitsPerSample", &stdInterpreter}, - {0, 2, 0, 0, 0x0103, "Compression", &compressionInterpreter}, - {0, 2, 0, 0, 0x0106, "PhotometricInterpretation", &photometricInterpreter}, - {0, 1, 1, 0, 0x010E, "ImageDescription", &stdInterpreter}, - {0, 1, 0, 0, 0x010F, "Make", &stdInterpreter}, - {0, 1, 0, 0, 0x0110, "Model", &stdInterpreter}, - {1, 0, 0, 0, 0x0111, "StripOffsets", &stdInterpreter}, - {0, 2, 0, 0, 0x0112, "Orientation", &orientationInterpreter}, - {0, 2, 0, 0, 0x0115, "SamplesPerPixel", &stdInterpreter}, - {1, 0, 0, 0, 0x0116, "RowsPerStrip", &stdInterpreter}, - {1, 0, 0, 0, 0x0117, "StripByteCounts", &stdInterpreter}, - {0, 2, 0, 0, 0x011A, "XResolution", &stdInterpreter}, - {0, 2, 0, 0, 0x011B, "YResolution", &stdInterpreter}, - {0, 2, 0, 0, 0x011C, "PlanarConfiguration", &planarConfigInterpreter}, - {0, 2, 0, 0, 0x0128, "ResolutionUnit", &unitsInterpreter}, - {0, 2, 0, 0, 0x012D, "TransferFunction", &stdInterpreter}, - {0, 2, 0, 0, 0x0131, "Software", &stdInterpreter}, - {0, 1, 0, 0, 0x0132, "DateTime", &stdInterpreter}, - {0, 1, 1, 0, 0x013B, "Artist", &stdInterpreter}, - {0, 2, 0, 0, 0x013E, "WhitePoint", &stdInterpreter}, - {0, 2, 0, 0, 0x013F, "PriomaryChromaticities", &stdInterpreter}, - {0, 1, 0, ifdAttribs, 0x014A, "SubIFD", &stdInterpreter}, - {0, 2, 0, 0, 0x0201, "JPEGInterchangeFormat", &stdInterpreter}, - {0, 2, 0, 0, 0x0202, "JPEGInterchangeFormatLength", &stdInterpreter}, - {0, 2, 0, 0, 0x0211, "YCbCrCoefficients", &stdInterpreter}, - {0, 2, 0, 0, 0x0212, "YCbCrSubSampling", &stdInterpreter}, - {0, 2, 0, 0, 0x0213, "YCbCrPositioning", &stdInterpreter}, - {0, 2, 0, 0, 0x0214, "ReferenceBlackWhite", &stdInterpreter}, - {0, 2, 0, 0, 0x02bc, "ApplicationNotes", &utf8BinInterpreter}, // XMP - {0, 1, 0, 0, 0x4746, "Rating",&stdInterpreter}, - {0, 1, 0, 0, 0x4749, "RatingPercent",&stdInterpreter}, - {0, 1, 0, 0, 0x828d, "CFAPatternDim", &stdInterpreter}, - {0, 1, 0, 0, 0x828e, "CFAPattern", &cfaInterpreter}, - {0, 1, 1, 0, 0x8298, "Copyright", &stdInterpreter}, - {0, 0, 0, 0, 0x8606, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format - {0, 1, 0, exifAttribs, 0x8769, "Exif", &stdInterpreter}, - {0, 2, 0, 0, 0x8773, "ICCProfile", &stdInterpreter}, - {0, 2, 0, 0, 0x83BB, "IPTCData", &stdInterpreter}, - {0, 1, 0, gpsAttribs, 0x8825, "GPSInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x9003, "DateTimeOriginal", &stdInterpreter}, - {0, 1, 0, 0, 0x9004, "DateTimeDigitized", &stdInterpreter}, - {0, 1, 0, 0, 0x9211, "ImageNumber", &stdInterpreter}, - {0, 1, 0, iopAttribs, 0xA005, "Interoperability", &stdInterpreter}, - {0, 0, 0, 0, 0xC4A5, "PrintIMInformation", &stdInterpreter}, - {0, 1, 0, 0, 0xc62f, "CameraSerialNumber", &stdInterpreter}, - {0, 2, 0, 0, 0xc630, "DNGLensInfo", &stdInterpreter}, - {0, 1, 0, 0, 0xc65d, "RawDataUniqueID", &stdInterpreter}, - {0, 0, 0, 0, 0xc761, "NoiseProfile", &stdInterpreter}, - {0, 2, 0, 0, 0x00fe, "NewSubFileType", &stdInterpreter}, - {-1, 0, 0, 0, 0, "", NULL}}; + {0, AC_SYSTEM, 0, 0, 0x0017, AUTO, "PanaISO", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, + {0, AC_WRITE, 1, 0, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x010F, AUTO, "Make", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0110, AUTO, "Model", &stdInterpreter}, + {1, AC_DONTWRITE, 0, 0, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0112, AUTO, "Orientation", &orientationInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, + {1, AC_DONTWRITE, 0, 0, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, + {1, AC_DONTWRITE, 0, 0, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x011A, AUTO, "XResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x011B, AUTO, "YResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0131, AUTO, "Software", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x0132, AUTO, "DateTime", &stdInterpreter}, + {0, AC_WRITE, 1, 0, 0x013B, AUTO, "Artist", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, + {0, AC_WRITE, 0, ifdAttribs, 0x014A, AUTO, "SubIFD", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP + {0, AC_WRITE, 0, 0, 0x4746, AUTO, "Rating",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x4749, AUTO, "RatingPercent",&stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 1, 0, 0x8298, AUTO, "Copyright", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format + {0, AC_WRITE, 0, exifAttribs, 0x8769, AUTO, "Exif", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, + {0, AC_WRITE, 0, gpsAttribs, 0x8825, AUTO, "GPSInfo", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, + {0, AC_WRITE, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, 0, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData + {0, AC_WRITE, 0, 0, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_DONTWRITE, 0, 0, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, 0, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, + {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}}; } #endif diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 91d2ea371..f87c81c38 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -737,7 +737,7 @@ void EditorPanel::info_toggled () { Glib::ustring(idata->apertureToString(idata->getFNumber())), Glib::ustring(idata->shutterToString(idata->getShutterSpeed())), M("QINFO_ISO"), idata->getISOSpeed(), - idata->getFocalLen()); + Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), idata->getFocalLen())); expcomp = Glib::ustring(idata->expcompToString(idata->getExpComp(),true)); // maskZeroexpcomp if (expcomp!=""){ diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index fce35b62b..58a46bd42 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -24,7 +24,6 @@ using namespace rtengine; using namespace rtengine::procparams; using namespace rtexif; -extern Glib::ustring argv0; ExifPanel::ExifPanel () : idata(NULL) { @@ -154,9 +153,9 @@ void ExifPanel::setImageData (const ImageMetaData* id) { const std::vector& defTags = ExifManager::getDefaultTIFFTags (NULL); for (size_t i=0; inameToString() == "ImageWidth" || defTags[i]->nameToString() == "ImageHeight" || defTags[i]->nameToString() == "BitsPerSample") - addTag (exifTreeModel->children(), defTags[i]->nameToString(), "?", SYSTEM, false); + addTag (exifTreeModel->children(), defTags[i]->nameToString(), "?", AC_SYSTEM, false); else - addTag (exifTreeModel->children(), defTags[i]->nameToString(), defTags[i]->valueToString(), SYSTEM, false); + addTag (exifTreeModel->children(), defTags[i]->nameToString(), defTags[i]->valueToString(), AC_SYSTEM, false); if (id && id->getExifData ()) { // id->getExifData ()->printAll (); @@ -164,7 +163,7 @@ void ExifPanel::setImageData (const ImageMetaData* id) { } } -Gtk::TreeModel::Children ExifPanel::addTag (const Gtk::TreeModel::Children& root, Glib::ustring field, Glib::ustring value, int action, bool editable) { +Gtk::TreeModel::Children ExifPanel::addTag (const Gtk::TreeModel::Children& root, Glib::ustring field, Glib::ustring value, rtexif::ActionCode action, bool editable) { Gtk::TreeModel::Row row = *(exifTreeModel->append(root)); row[exifColumns.action] = action; @@ -174,22 +173,22 @@ Gtk::TreeModel::Children ExifPanel::addTag (const Gtk::TreeModel::Children& root row[exifColumns.value_nopango] = value; row[exifColumns.orig_value] = value; - if (action==WRITE) + if (action==AC_WRITE) row[exifColumns.icon] = keepicon; - else if (action==DONTWRITE) + else if (action==AC_DONTWRITE) row[exifColumns.icon] = delicon; if (editable) { - row[exifColumns.field] = Glib::ustring("") + field + ""; - row[exifColumns.value] = Glib::ustring("") + value + ""; + row[exifColumns.field] = Glib::ustring("") + escapeHtmlChars(field) + ""; + row[exifColumns.value] = Glib::ustring("") + escapeHtmlChars(value) + ""; } - else if (action==SYSTEM) { - row[exifColumns.field] = Glib::ustring("") + field + ""; - row[exifColumns.value] = Glib::ustring("") + value + ""; + else if (action==AC_SYSTEM) { + row[exifColumns.field] = Glib::ustring("") + escapeHtmlChars(field) + ""; + row[exifColumns.value] = Glib::ustring("") + escapeHtmlChars(value) + ""; } else { - row[exifColumns.field] = field; - row[exifColumns.value] = value; + row[exifColumns.field] = escapeHtmlChars(field); + row[exifColumns.value] = escapeHtmlChars(value); } return row.children(); @@ -199,15 +198,15 @@ void ExifPanel::addDirectory (const TagDirectory* dir, Gtk::TreeModel::Children for (int i=0; igetCount(); i++) { Tag* t = (const_cast(dir))->getTagByIndex (i); - if (t->getAttrib() && t->getAttrib()->action==SYSTEM) + if (t->getAttrib() && t->getAttrib()->action==AC_SYSTEM) continue; if (t->isDirectory()) for (int j=0; t->getDirectory(j); j++) { - Gtk::TreeModel::Children ch = addTag (root, t->nameToString (j), M("EXIFPANEL_SUBDIRECTORY"), t->getAttrib() ? t->getAttrib()->action : 0, t->getAttrib() && t->getAttrib()->editable); + Gtk::TreeModel::Children ch = addTag (root, t->nameToString (j), M("EXIFPANEL_SUBDIRECTORY"), t->getAttrib() ? t->getAttrib()->action : AC_DONTWRITE, t->getAttrib() && t->getAttrib()->editable); addDirectory (t->getDirectory(j), ch); } else - addTag (root, t->nameToString (), t->valueToString (), t->getAttrib() ? (t->getOwnMemory()?t->getAttrib()->action:SYSTEM) : 0, t->getAttrib() && t->getAttrib()->editable); + addTag (root, t->nameToString (), t->valueToString (), t->getAttrib() ? (t->getOwnMemory()?t->getAttrib()->action:AC_SYSTEM) : AC_DONTWRITE, t->getAttrib() && t->getAttrib()->editable); } } @@ -222,7 +221,7 @@ void ExifPanel::exifSelectionChanged () { } else if (sel.size()==1) { Gtk::TreeModel::iterator iter = exifTreeModel->get_iter (sel[0]); - if (iter->get_value (exifColumns.action)==SYSTEM) { + if (iter->get_value (exifColumns.action)==AC_SYSTEM) { remove->set_sensitive (0); keep->set_sensitive (0); reset->set_sensitive (0); @@ -255,7 +254,7 @@ void ExifPanel::delIt (Gtk::TreeModel::iterator iter) { if (!iter) return; - if (iter->get_value (exifColumns.action) != SYSTEM) + if (iter->get_value (exifColumns.action) != AC_SYSTEM) iter->set_value (exifColumns.icon, delicon); if (recursiveOp) for (Gtk::TreeModel::iterator i=iter->children().begin(); i!=iter->children().end(); i++) @@ -278,7 +277,7 @@ void ExifPanel::keepIt (Gtk::TreeModel::iterator iter) { if (!iter) return; - if (iter->get_value (exifColumns.action) != SYSTEM) + if (iter->get_value (exifColumns.action) != AC_SYSTEM) iter->set_value (exifColumns.icon, iter->get_value (exifColumns.edited) ? editicon : keepicon); if (recursiveOp) for (Gtk::TreeModel::iterator i=iter->children().begin(); i!=iter->children().end(); i++) @@ -301,14 +300,14 @@ void ExifPanel::keepPressed () { if (!iter) return; - if (iter->get_value (exifColumns.action)!=SYSTEM) + if (iter->get_value (exifColumns.action)!=AC_SYSTEM) iter->set_value (exifColumns.icon, iter->get_value (exifColumns.action) ? keepicon : delicon); if (iter->get_value (exifColumns.edited)) { iter->set_value (exifColumns.value, Glib::ustring("") + iter->get_value(exifColumns.orig_value) + ""); iter->set_value (exifColumns.value_nopango, iter->get_value(exifColumns.orig_value)); - iter->set_value (exifColumns.edited, false); + iter->set_value (exifColumns.edited, false); } - if (iter->get_value (exifColumns.action)==100) + if (iter->get_value (exifColumns.action)==AC_INVALID) exifTreeModel->erase (iter); else if (recursiveOp) @@ -320,14 +319,14 @@ Gtk::TreeModel::iterator ExifPanel::resetIt (Gtk::TreeModel::iterator iter) { if (!iter) return iter; - if (iter->get_value (exifColumns.action)!=SYSTEM) + if (iter->get_value (exifColumns.action)!=AC_SYSTEM) iter->set_value (exifColumns.icon, iter->get_value (exifColumns.action) ? keepicon : delicon); if (iter->get_value (exifColumns.edited)) { iter->set_value (exifColumns.value, Glib::ustring("") + iter->get_value(exifColumns.orig_value) + ""); iter->set_value (exifColumns.value_nopango, iter->get_value(exifColumns.orig_value)); - iter->set_value (exifColumns.edited, false); + iter->set_value (exifColumns.edited, false); } - if (iter->get_value (exifColumns.action)==100) { + if (iter->get_value (exifColumns.action)==AC_INVALID) { return exifTreeModel->erase (iter); } else @@ -434,7 +433,7 @@ void ExifPanel::editTag (Gtk::TreeModel::Children root, Glib::ustring name, Glib if (iter==root.end() && value!="#keep" && value!="#delete") { iter = exifTreeModel->append(root); iter->set_value (exifColumns.field_nopango, fseg); - iter->set_value (exifColumns.action, 100); + iter->set_value (exifColumns.action, AC_INVALID); if (dp==Glib::ustring::npos) { iter->set_value (exifColumns.value, Glib::ustring("") + value + ""); iter->set_value (exifColumns.value_nopango, value); @@ -454,9 +453,9 @@ void ExifPanel::editTag (Gtk::TreeModel::Children root, Glib::ustring name, Glib } if (dp==Glib::ustring::npos) { - if (value=="#keep" && iter->get_value (exifColumns.action)!=SYSTEM) + if (value=="#keep" && iter->get_value (exifColumns.action)!=AC_SYSTEM) iter->set_value (exifColumns.icon, iter->get_value (exifColumns.edited) ? editicon : keepicon); - else if (value=="#delete" && iter->get_value (exifColumns.action)!=SYSTEM) + else if (value=="#delete" && iter->get_value (exifColumns.action)!=AC_SYSTEM) iter->set_value (exifColumns.icon, delicon); else { iter->set_value (exifColumns.value, Glib::ustring("") + value + ""); @@ -516,9 +515,9 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre for (iter = root.begin(); iter!=root.end(); iter++) { if (iter->get_value (exifColumns.edited) == true) changeList[ prefix+iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); - else if (iter->get_value (exifColumns.action) == WRITE && iter->get_value (exifColumns.icon) == delicon) + else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) changeList[ prefix+iter->get_value (exifColumns.field_nopango) ] = "#delete"; - else if (iter->get_value (exifColumns.action) == DONTWRITE && iter->get_value (exifColumns.icon) == keepicon) + else if (iter->get_value (exifColumns.action) == AC_DONTWRITE && iter->get_value (exifColumns.icon) == keepicon) changeList[ prefix+iter->get_value (exifColumns.field_nopango) ] = "#keep"; if (iter->get_value (exifColumns.icon) == keepicon) updateChangeList (iter->children(), prefix + iter->get_value (exifColumns.field_nopango)); diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index 5dbc3676b..1a5513031 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -31,7 +31,7 @@ class ExifPanel : public Gtk::VBox, public ToolPanel { rtengine::procparams::ExifPairs changeList; rtengine::procparams::ExifPairs defChangeList; bool recursiveOp; - + class ExifColumns : public Gtk::TreeModelColumnRecord { public: Gtk::TreeModelColumn > icon; @@ -40,31 +40,31 @@ class ExifPanel : public Gtk::VBox, public ToolPanel { Gtk::TreeModelColumn value; Gtk::TreeModelColumn value_nopango; Gtk::TreeModelColumn orig_value; - Gtk::TreeModelColumn action; // = 0: dont write to output, =1: write to output, =2: chagned by RT (not editable/deletable), =3: new addition - Gtk::TreeModelColumn editable; - Gtk::TreeModelColumn edited; + Gtk::TreeModelColumn action; + Gtk::TreeModelColumn editable; + Gtk::TreeModelColumn edited; ExifColumns() { add(field); add(value); add(icon); add(action); add(edited); add(field_nopango); add(value_nopango); add(editable); add(orig_value); } }; Glib::RefPtr delicon; Glib::RefPtr keepicon; Glib::RefPtr editicon; - + ExifColumns exifColumns; Gtk::TreeView* exifTree; Gtk::ScrolledWindow* scrolledWindow; Glib::RefPtr exifTreeModel; - + Gtk::Button* remove; Gtk::Button* keep; Gtk::Button* add; Gtk::Button* reset; Gtk::Button* resetAll; - - Gtk::TreeModel::Children addTag (const Gtk::TreeModel::Children& root, Glib::ustring field, Glib::ustring value, int action, bool editable); + + Gtk::TreeModel::Children addTag (const Gtk::TreeModel::Children& root, Glib::ustring field, Glib::ustring value, rtexif::ActionCode action, bool editable); void editTag (Gtk::TreeModel::Children root, Glib::ustring name, Glib::ustring value); void updateChangeList (Gtk::TreeModel::Children root, std::string prefix); - void addDirectory (const rtexif::TagDirectory* dir, Gtk::TreeModel::Children root); + void addDirectory (const rtexif::TagDirectory* dir, Gtk::TreeModel::Children root); Glib::ustring getSelection (bool onlyifeditable=false); Glib::ustring getSelectedValue (); void updateChangeList (); @@ -75,12 +75,12 @@ class ExifPanel : public Gtk::VBox, public ToolPanel { public: ExifPanel (); virtual ~ExifPanel (); - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); - - void setImageData (const rtengine::ImageMetaData* id); + + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); + + void setImageData (const rtengine::ImageMetaData* id); void exifSelectionChanged (); void removePressed (); @@ -89,9 +89,9 @@ class ExifPanel : public Gtk::VBox, public ToolPanel { void resetAllPressed (); void addPressed (); void row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); - + void notifyListener (); - + }; #endif diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index dcdf4b1c5..ef9475781 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -515,7 +515,7 @@ void Thumbnail::generateExifDateTimeStrings () { if (!cfs.exifValid) return; - exifString = Glib::ustring::compose ("f/%1 %2s %3%4 %5mm", Glib::ustring(rtengine::ImageData::apertureToString(cfs.fnumber)), Glib::ustring(rtengine::ImageData::shutterToString(cfs.shutter)), M("QINFO_ISO"), cfs.iso, cfs.focalLen); + exifString = Glib::ustring::compose ("f/%1 %2s %3%4 %5mm", Glib::ustring(rtengine::ImageData::apertureToString(cfs.fnumber)), Glib::ustring(rtengine::ImageData::shutterToString(cfs.shutter)), M("QINFO_ISO"), cfs.iso, Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), cfs.focalLen)); if (options.fbShowExpComp && cfs.expcomp!="0.00" && cfs.expcomp!="") // don't show exposure compensation if it is 0.00EV;old cache iles do not have ExpComp, so value will not be displayed. exifString = Glib::ustring::compose ("%1 %2EV", exifString, cfs.expcomp); // append exposure compensation to exifString