[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:38:46 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=538a5c0
The following commit has been merged in the master branch:
commit 538a5c0e77b77be0ebc4396c0145c786c3648886
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Thu Sep 27 18:35:21 2007 +0000
Introduced EXV_PRINT_COMBITAG for Pentax multi-value lookups.
---
src/pentaxmn.cpp | 817 ++++++++++++++-----------------------------------------
src/pentaxmn.hpp | 51 +++-
2 files changed, 250 insertions(+), 618 deletions(-)
diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp
index 06214be..6f602aa 100644
--- a/src/pentaxmn.cpp
+++ b/src/pentaxmn.cpp
@@ -23,9 +23,9 @@
Version: $Rev$
Author(s): Michal Cihar <michal at cihar.com>
Based on fujimn.cpp by:
- Andreas Huggel (ahu) <ahuggel at gmx.net>
+ Andreas Huggel (ahu) <ahuggel at gmx.net>
Gilles Caulier (gc) <caulier.gilles at kdemail.net>
- History: 07-09-27 created
+ History: 27-Sep-07 created
Credits: See header file.
*/
// *****************************************************************************
@@ -396,12 +396,213 @@ namespace Exiv2 {
{ 70, N_("Lisbon") },
};
+ //! ImageProcessing, combi-tag 0x0032 (4 bytes)
+ extern const TagDetails pentaxImageProcessing[] = {
+ { 0x00000000, N_("Unprocessed") },
+ { 0x00000004, N_("Digital Filter") },
+ { 0x02000000, N_("Cropped") },
+ { 0x04000000, N_("Color Filter") },
+ { 0x10000000, N_("Frame Synthesis?") }
+ };
+
+ //! PictureMode, combi-tag 0x0033 (3 bytes)
+ extern const TagDetails pentaxPictureMode[] = {
+ { 0x000000, N_("Program") },
+ { 0x000400, N_("Standard") },
+ { 0x000500, N_("Portrait") },
+ { 0x000600, N_("Landscape") },
+ { 0x000700, N_("Macro") },
+ { 0x000800, N_("Sport") },
+ { 0x000900, N_("Night Scene Portrait") },
+ { 0x000a00, N_("No Flash") },
+ /* SCN modes (menu-selected) */
+ { 0x000b00, N_("Night Scene") },
+ { 0x000c00, N_("Surf & Snow") },
+ { 0x000d00, N_("Text") },
+ { 0x000e00, N_("Sunset") },
+ { 0x000f00, N_("Kids") },
+ { 0x001000, N_("Pet") },
+ { 0x001100, N_("Candlelight") },
+ { 0x001200, N_("Museum") },
+ /* AUTO PICT modes (auto-selected) */
+ { 0x010400, N_("Auto PICT (Standard)") },
+ { 0x010500, N_("Auto PICT (Portrait)") },
+ { 0x010600, N_("Auto PICT (Landscape)") },
+ { 0x010700, N_("Auto PICT (Macro)") },
+ { 0x010800, N_("Auto PICT (Sport)") },
+ /* Manual dial modes */
+ { 0x020000, N_("Program AE") },
+ { 0x030000, N_("Green Mode") },
+ { 0x040000, N_("Shutter Speed Priority") },
+ { 0x050000, N_("Aperture Priority") },
+ { 0x080000, N_("Manual") },
+ { 0x090000, N_("Bulb") },
+ /* *istD modes */
+ { 0x020001, N_("Program AE") },
+ { 0x020101, N_("Hi-speed Program") },
+ { 0x020201, N_("DOF Program") },
+ { 0x020301, N_("MTF Program") },
+ { 0x030001, N_("Green Mode") },
+ { 0x040001, N_("Shutter Speed Priority") },
+ { 0x050001, N_("Aperture Priority") },
+ { 0x060001, N_("Program Tv Shift") },
+ { 0x070001, N_("Program Av Shift") },
+ { 0x080001, N_("Manual") },
+ { 0x090001, N_("Bulb") },
+ { 0x0a0001, N_("Aperture Priority (Off-Auto-Aperture)") },
+ { 0x0b0001, N_("Manual (Off-Auto-Aperture)") },
+ { 0x0c0001, N_("Bulb (Off-Auto-Aperture)") },
+ /* K10D modes */
+ { 0x060000, N_("Shutter Priority") },
+ { 0x0d0000, N_("Shutter & Aperture Priority AE") },
+ { 0x0d0001, N_("Shutter & Aperture Priority AE (1)") },
+ { 0x0f0000, N_("Sensitivity Priority AE") },
+ { 0x0f0001, N_("Sensitivity Priority AE (1)") },
+ { 0x100000, N_("Flash X-Sync Speed AE") },
+ { 0x100001, N_("Flash X-Sync Speed AE (1)") },
+ /* other modes */
+ { 0x000001, N_("Program") }
+ };
+
+ //! DriveMode, combi-tag 0x0034 (4 bytes)
+ extern const TagDetails pentaxDriveMode[] = {
+ { 0x00000000, N_("Single-frame") },
+ { 0x01000000, N_("Continuous") },
+ { 0x00010000, N_("Self-timer (12 sec)") },
+ { 0x00020000, N_("Self-timer (2 sec)") },
+ { 0x00000100, N_("Remote Control?") },
+ { 0x00000001, N_("Multiple Exposure") },
+ };
+
//! ColorSpace, tag 0x0037
extern const TagDetails pentaxColorSpace[] = {
{ 0, N_("sRGB") },
{ 1, N_("Adobe RGB") },
};
+ //! LensType, combi-tag 0x003f (2 unsigned long)
+ extern const TagDetails pentaxLensType[] = {
+ { 0x0000, N_("M-42 or No Lens") },
+ { 0x0100, N_("K,M Lens") },
+ { 0x0200, N_("A Series Lens") },
+ { 0x0300, "SIGMA" },
+ { 0x0311, "smc PENTAX-FA SOFT 85mm F2.8" },
+ { 0x0312, "smc PENTAX-F 1.7X AF ADAPTER" },
+ { 0x0313, "smc PENTAX-F 24-50mm F4" },
+ { 0x0314, "smc PENTAX-F 35-80mm F4-5.6" },
+ { 0x0315, "smc PENTAX-F 80-200mm F4.7-5.6" },
+ { 0x0316, "smc PENTAX-F FISH-EYE 17-28mm F3.5-4.5" },
+ { 0x0317, "smc PENTAX-F 100-300mm F4.5-5.6" },
+ { 0x0318, "smc PENTAX-F 35-135mm F3.5-4.5" },
+ { 0x0319, "smc PENTAX-F 35-105mm F4-5.6 or SIGMA or Tokina" },
+ { 0x031a, "smc PENTAX-F* 250-600mm F5.6 ED[IF]" },
+ { 0x031b, "smc PENTAX-F 28-80mm F3.5-4.5" },
+ { 0x031c, "smc PENTAX-F 35-70mm F3.5-4.5" },
+ { 0x031d, "PENTAX-F 28-80mm F3.5-4.5 or SIGMA AF 18-125mm F3.5-5.6 DC" },
+ { 0x031e, "PENTAX-F 70-200mm F4-5.6" },
+ { 0x031f, "smc PENTAX-F 70-210mm F4-5.6" },
+ { 0x0320, "smc PENTAX-F 50mm F1.4" },
+ { 0x0321, "smc PENTAX-F 50mm F1.7" },
+ { 0x0322, "smc PENTAX-F 135mm F2.8 [IF]" },
+ { 0x0323, "smc PENTAX-F 28mm F2.8" },
+ { 0x0324, "SIGMA 20mm F1.8 EX DG ASPHERICAL RF" },
+ { 0x0326, "smc PENTAX-F* 300mm F4.5 ED[IF]" },
+ { 0x0327, "smc PENTAX-F* 600mm F4 ED[IF]" },
+ { 0x0328, "smc PENTAX-F MACRO 100mm F2.8" },
+ { 0x0329, "smc PENTAX-F MACRO 50mm F2.8 or Sigma 50mm F2,8 MACRO" },
+ { 0x032c, "Tamron 35-90mm F4 AF or various SIGMA models" },
+ { 0x032e, "SIGMA APO 70-200mm F2.8 EX" },
+ { 0x0332, "smc PENTAX-FA 28-70mm F4 AL" },
+ { 0x0333, "SIGMA 28mm F1.8 EX DG ASPHERICAL MACRO" },
+ { 0x0334, "smc PENTAX-FA 28-200mm F3.8-5.6 AL[IF]" },
+ { 0x0335, "smc PENTAX-FA 28-80mm F3.5-5.6 AL" },
+ { 0x03f7, "smc PENTAX-DA FISH-EYE 10-17mm F3.5-4.5 ED[IF]" },
+ { 0x03f8, "smc PENTAX-DA 12-24mm F4 ED AL[IF]" },
+ { 0x03fa, "smc PENTAX-DA 50-200mm F4-5.6 ED" },
+ { 0x03fb, "smc PENTAX-DA 40mm F2.8 Limited" },
+ { 0x03fc, "smc PENTAX-DA 18-55mm F3.5-5.6 AL" },
+ { 0x03fd, "smc PENTAX-DA 14mm F2.8 ED[IF]" },
+ { 0x03fe, "smc PENTAX-DA 16-45mm F4 ED AL" },
+ { 0x03ff, "SIGMA" },
+ { 0x0401, "smc PENTAX-FA SOFT 28mm F2.8" },
+ { 0x0402, "smc PENTAX-FA 80-320mm F4.5-5.6" },
+ { 0x0403, "smc PENTAX-FA 43mm F1.9 Limited" },
+ { 0x0406, "smc PENTAX-FA 35-80mm F4-5.6" },
+ { 0x040c, "smc PENTAX-FA 50mm F1.4" },
+ { 0x040f, "smc PENTAX-FA 28-105mm F4-5.6 [IF]" },
+ { 0x0410, "TAMRON AF 80-210mm F4-5.6 (178D)" },
+ { 0x0413, "TAMRON SP AF 90mm F2.8 (172E)" },
+ { 0x0414, "smc PENTAX-FA 28-80mm F3.5-5.6" },
+ { 0x0416, "TOKINA 28-80mm F3.5-5.6" },
+ { 0x0417, "smc PENTAX-FA 20-35mm F4 AL" },
+ { 0x0418, "smc PENTAX-FA 77mm F1.8 Limited" },
+ { 0x0419, "TAMRON SP AF 14mm F2.8" },
+ { 0x041a, "smc PENTAX-FA MACRO 100mm F3.5" },
+ { 0x041b, "TAMRON AF28-300mm F/3.5-6.3 LD Aspherical[IF] MACRO (285D)" },
+ { 0x041c, "smc PENTAX-FA 35mm F2 AL" },
+ { 0x041d, "TAMRON AF 28-200mm F/3.8-5.6 LD Super II MACRO (371D)" },
+ { 0x0422, "smc PENTAX-FA 24-90mm F3.5-4.5 AL[IF]" },
+ { 0x0423, "smc PENTAX-FA 100-300mm F4.7-5.8" },
+ { 0x0424, "TAMRON AF70-300mm F/4-5.6 LD MACRO" },
+ { 0x0425, "TAMRON SP AF 24-135mm F3.5-5.6 AD AL (190D)" },
+ { 0x0426, "smc PENTAX-FA 28-105mm F3.2-4.5 AL[IF]" },
+ { 0x0427, "smc PENTAX-FA 31mm F1.8AL Limited" },
+ { 0x0429, "TAMRON AF 28-200mm Super Zoom F3.8-5.6 Aspherical XR [IF] MACRO (A03)" },
+ { 0x042b, "smc PENTAX-FA 28-90mm F3.5-5.6" },
+ { 0x042c, "smc PENTAX-FA J 75-300mm F4.5-5.8 AL" },
+ { 0x042d, "TAMRON 28-300mm F3.5-6.3 Ultra zoom XR" },
+ { 0x042e, "smc PENTAX-FA J 28-80mm F3.5-5.6 AL" },
+ { 0x042f, "smc PENTAX-FA J 18-35mm F4-5.6 AL" },
+ { 0x0431, "TAMRON SP AF 28-75mm F2.8 XR Di (A09)" },
+ { 0x0433, "smc PENTAX-D FA 50mm F2.8 MACRO" },
+ { 0x0434, "smc PENTAX-D FA 100mm F2.8 MACRO" },
+ { 0x04f4, "smc PENTAX-DA 21mm F3.2 AL Limited" },
+ { 0x04f5, "Schneider D-XENON 50-200mm" },
+ { 0x04f6, "Schneider D-XENON 18-55mm" },
+ { 0x04f7, "smc PENTAX-DA 10-17mm F3.5-4.5 ED [IF] Fisheye zoom" },
+ { 0x04f8, "smc PENTAX-DA 12-24mm F4 ED AL [IF]" },
+ { 0x04f9, "TAMRON XR DiII 18-200mm F3.5-6.3 (A14)" },
+ { 0x04fa, "smc PENTAX-DA 50-200mm F4-5.6 ED" },
+ { 0x04fb, "smc PENTAX-DA 40mm F2.8 Limited" },
+ { 0x04fc, "smc PENTAX-DA 18-55mm F3.5-5.6 AL" },
+ { 0x04fd, "smc PENTAX-DA 14mm F2.8 ED[IF]" },
+ { 0x04fe, "smc PENTAX-DA 16-45mm F4 ED AL" },
+ { 0x0501, "smc PENTAX-FA* 24mm F2 AL[IF]" },
+ { 0x0502, "smc PENTAX-FA 28mm F2.8 AL" },
+ { 0x0503, "smc PENTAX-FA 50mm F1.7" },
+ { 0x0504, "smc PENTAX-FA 50mm F1.4" },
+ { 0x0505, "smc PENTAX-FA* 600mm F4 ED[IF]" },
+ { 0x0506, "smc PENTAX-FA* 300mm F4.5 ED[IF]" },
+ { 0x0507, "smc PENTAX-FA 135mm F2.8 [IF]" },
+ { 0x0508, "smc PENTAX-FA MACRO 50mm F2.8" },
+ { 0x0509, "smc PENTAX-FA MACRO 100mm F2.8" },
+ { 0x050a, "smc PENTAX-FA* 85mm F1.4 [IF]" },
+ { 0x050b, "smc PENTAX-FA* 200mm F2.8 ED[IF]" },
+ { 0x050c, "smc PENTAX-FA 28-80mm F3.5-4.7" },
+ { 0x050d, "smc PENTAX-FA 70-200mm F4-5.6" },
+ { 0x050e, "smc PENTAX-FA* 250-600mm F5.6 ED[IF]" },
+ { 0x050f, "smc PENTAX-FA 28-105mm F4-5.6" },
+ { 0x0510, "smc PENTAX-FA 100-300mm F4.5-5.6" },
+ { 0x0601, "smc PENTAX-FA* 85mm F1.4[IF]" },
+ { 0x0602, "smc PENTAX-FA* 200mm F2.8 ED[IF]" },
+ { 0x0603, "smc PENTAX-FA* 300mm F2.8 ED[IF]" },
+ { 0x0604, "smc PENTAX-FA* 28-70mm F2.8 AL" },
+ { 0x0605, "smc PENTAX-FA* 80-200mm F2.8 ED[IF]" },
+ { 0x0606, "smc PENTAX-FA* 28-70mm F2.8 AL" },
+ { 0x0607, "smc PENTAX-FA* 80-200mm F2.8 ED[IF]" },
+ { 0x0608, "smc PENTAX-FA 28-70mm F4AL" },
+ { 0x0609, "smc PENTAX-FA 20mm F2.8" },
+ { 0x060a, "smc PENTAX-FA* 400mm F5.6 ED[IF]" },
+ { 0x060d, "smc PENTAX-FA* 400mm F5.6 ED[IF]" },
+ { 0x060e, "smc PENTAX-FA* MACRO 200mm F4 ED[IF]" },
+ { 0x0700, "smc PENTAX-DA 21mm F3.2 AL Limited" },
+ { 0x07ee, "TAMRON AF 18-250mm F3.5-6.3 Di II LD Aspherical [IF] MACRO" },
+ { 0x07f3, "smc PENTAX-DA 70mm F2.4 Limited" },
+ { 0x07f4, "smc PENTAX-DA 21mm F3.2 AL Limited" },
+ { 0x08f1, "smc PENTAX-DA* 50-135mm F2.8 ED [IF] SDM" },
+ { 0x08f2, "smc PENTAX-DA* 16-50mm F2.8 ED AL [IF] SDM" },
+ };
+
//! ImageTone, tag 0x004f
extern const TagDetails pentaxImageTone[] = {
{ 0, N_("Natural") },
@@ -545,603 +746,6 @@ namespace Exiv2 {
return os;
}
- std::ostream& PentaxMakerNote::printPentaxImageProcessing(std::ostream& os, const Value& value)
- {
- long l0 = value.toLong(0);
- long l1 = value.toLong(1);
- long l2 = value.toLong(2);
- long l3 = value.toLong(3);
-
- if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 0) {
- os << _("Unprocessed");
- } else if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 4) {
- os << _("Digital Filter");
- } else if (l0 == 2 && l1 == 0 && l2 == 0 && l3 == 0) {
- os << _("Cropped");
- } else if (l0 == 4 && l1 == 0 && l2 == 0 && l3 == 0) {
- os << _("Color Filter");
- } else if (l0 == 16 && l1 == 0 && l2 == 0 && l3 == 0) {
- os << _("Frame Synthesis?");
- } else {
- os << _("Unknown") << " (" << l0 << " " << l1 << " " << l2 << " " << l3 << ")";
- }
-
- return os;
- }
-
- std::ostream& PentaxMakerNote::printPentaxPictureMode(std::ostream& os, const Value& value)
- {
- long l0 = value.toLong(0);
- long l1 = value.toLong(1);
- long l2 = value.toLong(2);
-
- if (l0 == 0 && l1 == 0 && l2 == 0) {
- os << _("Program");
- } else if (l0 == 0 && l1 == 4 && l2 == 0) {
- os << _("Standard");
- } else if (l0 == 0 && l1 == 5 && l2 == 0) {
- os << _("Portrait");
- } else if (l0 == 0 && l1 == 6 && l2 == 0) {
- os << _("Landscape");
- } else if (l0 == 0 && l1 == 7 && l2 == 0) {
- os << _("Macro");
- } else if (l0 == 0 && l1 == 8 && l2 == 0) {
- os << _("Sport");
- } else if (l0 == 0 && l1 == 9 && l2 == 0) {
- os << _("Night Scene Portrait");
- } else if (l0 == 0 && l1 == 10 && l2 == 0) {
- os << _("No Flash");
- /* SCN modes (menu-selected) */
- } else if (l0 == 0 && l1 == 11 && l2 == 0) {
- os << _("Night Scene");
- } else if (l0 == 0 && l1 == 12 && l2 == 0) {
- os << _("Surf & Snow");
- } else if (l0 == 0 && l1 == 13 && l2 == 0) {
- os << _("Text");
- } else if (l0 == 0 && l1 == 14 && l2 == 0) {
- os << _("Sunset");
- } else if (l0 == 0 && l1 == 15 && l2 == 0) {
- os << _("Kids");
- } else if (l0 == 0 && l1 == 16 && l2 == 0) {
- os << _("Pet");
- } else if (l0 == 0 && l1 == 17 && l2 == 0) {
- os << _("Candlelight");
- } else if (l0 == 0 && l1 == 18 && l2 == 0) {
- os << _("Museum");
- /* AUTO PICT modes (auto-selected) */
- } else if (l0 == 1 && l1 == 4 && l2 == 0) {
- os << _("Auto PICT (Standard)");
- } else if (l0 == 1 && l1 == 5 && l2 == 0) {
- os << _("Auto PICT (Portrait)");
- } else if (l0 == 1 && l1 == 6 && l2 == 0) {
- os << _("Auto PICT (Landscape)");
- } else if (l0 == 1 && l1 == 7 && l2 == 0) {
- os << _("Auto PICT (Macro)");
- } else if (l0 == 1 && l1 == 8 && l2 == 0) {
- os << _("Auto PICT (Sport)");
- /* Manual dial modes */
- } else if (l0 == 2 && l1 == 0 && l2 == 0) {
- os << _("Program AE");
- } else if (l0 == 3 && l1 == 0 && l2 == 0) {
- os << _("Green Mode");
- } else if (l0 == 4 && l1 == 0 && l2 == 0) {
- os << _("Shutter Speed Priority");
- } else if (l0 == 5 && l1 == 0 && l2 == 0) {
- os << _("Aperture Priority");
- } else if (l0 == 8 && l1 == 0 && l2 == 0) {
- os << _("Manual");
- } else if (l0 == 9 && l1 == 0 && l2 == 0) {
- os << _("Bulb");
- /* *istD modes */
- } else if (l0 == 2 && l1 == 0 && l2 == 1) {
- os << _("Program AE");
- } else if (l0 == 2 && l1 == 1 && l2 == 1) {
- os << _("Hi-speed Program");
- } else if (l0 == 2 && l1 == 2 && l2 == 1) {
- os << _("DOF Program");
- } else if (l0 == 2 && l1 == 3 && l2 == 1) {
- os << _("MTF Program");
- } else if (l0 == 3 && l1 == 0 && l2 == 1) {
- os << _("Green Mode");
- } else if (l0 == 4 && l1 == 0 && l2 == 1) {
- os << _("Shutter Speed Priority");
- } else if (l0 == 5 && l1 == 0 && l2 == 1) {
- os << _("Aperture Priority");
- } else if (l0 == 6 && l1 == 0 && l2 == 1) {
- os << _("Program Tv Shift");
- } else if (l0 == 7 && l1 == 0 && l2 == 1) {
- os << _("Program Av Shift");
- } else if (l0 == 8 && l1 == 0 && l2 == 1) {
- os << _("Manual");
- } else if (l0 == 9 && l1 == 0 && l2 == 1) {
- os << _("Bulb");
- } else if (l0 == 10 && l1 == 0 && l2 == 1) {
- os << _("Aperture Priority (Off-Auto-Aperture)");
- } else if (l0 == 11 && l1 == 0 && l2 == 1) {
- os << _("Manual (Off-Auto-Aperture)");
- } else if (l0 == 12 && l1 == 0 && l2 == 1) {
- os << _("Bulb (Off-Auto-Aperture)");
- /* K10D modes */
- } else if (l0 == 6 && l1 == 0 && l2 == 0) {
- os << _("Shutter Priority");
- } else if (l0 == 13 && l1 == 0 && l2 == 0) {
- os << _("Shutter & Aperture Priority AE");
- } else if (l0 == 13 && l1 == 0 && l2 == 1) {
- os << _("Shutter & Aperture Priority AE (1)");
- } else if (l0 == 15 && l1 == 0 && l2 == 0) {
- os << _("Sensitivity Priority AE");
- } else if (l0 == 15 && l1 == 0 && l2 == 1) {
- os << _("Sensitivity Priority AE (1)");
- } else if (l0 == 16 && l1 == 0 && l2 == 0) {
- os << _("Flash X-Sync Speed AE");
- } else if (l0 == 16 && l1 == 0 && l2 == 1) {
- os << _("Flash X-Sync Speed AE (1)");
- /* other modes */
- } else if (l0 == 0 && l1 == 0 && l2 == 1) {
- os << _("Program");
- } else {
- os << _("Unknown") << " (" << l0 << " " << l1 << " " << l2 << ")";
- }
-
- return os;
- }
-
- std::ostream& PentaxMakerNote::printPentaxDriveMode(std::ostream& os, const Value& value)
- {
- long l0 = value.toLong(0);
- long l1 = value.toLong(1);
- long l2 = value.toLong(2);
- long l3 = value.toLong(3);
-
- if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 0) {
- os << _("Single-frame");
- } else if (l0 == 1 && l1 == 0 && l2 == 0 && l3 == 0) {
- os << _("Continuous");
- } else if (l0 == 0 && l1 == 1 && l2 == 0 && l3 == 0) {
- os << _("Self-timer (12 sec)");
- } else if (l0 == 0 && l1 == 2 && l2 == 0 && l3 == 0) {
- os << _("Self-timer (2 sec)");
- } else if (l0 == 0 && l1 == 0 && l2 == 1 && l3 == 0) {
- os << _("Remote Control?");
- } else if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 1) {
- os << _("Multiple Exposure");
- } else {
- os << _("Unknown") << " (" << l0 << " " << l1 << " " << l2 << " " << l3 << ")";
- }
-
- return os;
- }
-
- std::ostream& PentaxMakerNote::printPentaxLensType(std::ostream& os, const Value& value)
- {
- long l0 = value.toLong(0);
- long l1 = value.toLong(1);
-
- switch(l0) {
- case 0:
- switch (l1) {
- case 0:
- os << "M-42 or No Lens";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- case 1:
- switch (l1) {
- case 0:
- os << "K,M Lens";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- case 2:
- switch (l1) {
- case 0:
- os << "A Series Lens";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- case 3:
- switch (l1) {
- case 0:
- os << "SIGMA";
- break;
- case 17:
- os << "smc PENTAX-FA SOFT 85mm F2.8";
- break;
- case 18:
- os << "smc PENTAX-F 1.7X AF ADAPTER";
- break;
- case 19:
- os << "smc PENTAX-F 24-50mm F4";
- break;
- case 20:
- os << "smc PENTAX-F 35-80mm F4-5.6";
- break;
- case 21:
- os << "smc PENTAX-F 80-200mm F4.7-5.6";
- break;
- case 22:
- os << "smc PENTAX-F FISH-EYE 17-28mm F3.5-4.5";
- break;
- case 23:
- os << "smc PENTAX-F 100-300mm F4.5-5.6";
- break;
- case 24:
- os << "smc PENTAX-F 35-135mm F3.5-4.5";
- break;
- case 25:
- os << "smc PENTAX-F 35-105mm F4-5.6 or SIGMA or Tokina";
- break;
- case 26:
- os << "smc PENTAX-F* 250-600mm F5.6 ED[IF]";
- break;
- case 27:
- os << "smc PENTAX-F 28-80mm F3.5-4.5";
- break;
- case 28:
- os << "smc PENTAX-F 35-70mm F3.5-4.5";
- break;
- case 29:
- os << "PENTAX-F 28-80mm F3.5-4.5 or SIGMA AF 18-125mm F3.5-5.6 DC";
- break;
- case 30:
- os << "PENTAX-F 70-200mm F4-5.6";
- break;
- case 31:
- os << "smc PENTAX-F 70-210mm F4-5.6";
- break;
- case 32:
- os << "smc PENTAX-F 50mm F1.4";
- break;
- case 33:
- os << "smc PENTAX-F 50mm F1.7";
- break;
- case 34:
- os << "smc PENTAX-F 135mm F2.8 [IF]";
- break;
- case 35:
- os << "smc PENTAX-F 28mm F2.8";
- break;
- case 36:
- os << "SIGMA 20mm F1.8 EX DG ASPHERICAL RF";
- break;
- case 38:
- os << "smc PENTAX-F* 300mm F4.5 ED[IF]";
- break;
- case 39:
- os << "smc PENTAX-F* 600mm F4 ED[IF]";
- break;
- case 40:
- os << "smc PENTAX-F MACRO 100mm F2.8";
- break;
- case 41:
- os << "smc PENTAX-F MACRO 50mm F2.8 or Sigma 50mm F2,8 MACRO";
- break;
- case 44:
- os << "Tamron 35-90mm F4 AF or various SIGMA models";
- break;
- case 46:
- os << "SIGMA APO 70-200mm F2.8 EX";
- break;
- case 50:
- os << "smc PENTAX-FA 28-70mm F4 AL";
- break;
- case 51:
- os << "SIGMA 28mm F1.8 EX DG ASPHERICAL MACRO";
- break;
- case 52:
- os << "smc PENTAX-FA 28-200mm F3.8-5.6 AL[IF]";
- break;
- case 53:
- os << "smc PENTAX-FA 28-80mm F3.5-5.6 AL";
- break;
- case 247:
- os << "smc PENTAX-DA FISH-EYE 10-17mm F3.5-4.5 ED[IF]";
- break;
- case 248:
- os << "smc PENTAX-DA 12-24mm F4 ED AL[IF]";
- break;
- case 250:
- os << "smc PENTAX-DA 50-200mm F4-5.6 ED";
- break;
- case 251:
- os << "smc PENTAX-DA 40mm F2.8 Limited";
- break;
- case 252:
- os << "smc PENTAX-DA 18-55mm F3.5-5.6 AL";
- break;
- case 253:
- os << "smc PENTAX-DA 14mm F2.8 ED[IF]";
- break;
- case 254:
- os << "smc PENTAX-DA 16-45mm F4 ED AL";
- break;
- case 255:
- os << "SIGMA";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- break;
- case 4:
- switch (l1) {
- case 1:
- os << "smc PENTAX-FA SOFT 28mm F2.8";
- break;
- case 2:
- os << "smc PENTAX-FA 80-320mm F4.5-5.6";
- break;
- case 3:
- os << "smc PENTAX-FA 43mm F1.9 Limited";
- break;
- case 6:
- os << "smc PENTAX-FA 35-80mm F4-5.6";
- break;
- case 12:
- os << "smc PENTAX-FA 50mm F1.4";
- break;
- case 15:
- os << "smc PENTAX-FA 28-105mm F4-5.6 [IF]";
- break;
- case 16:
- os << "TAMRON AF 80-210mm F4-5.6 (178D)";
- break;
- case 19:
- os << "TAMRON SP AF 90mm F2.8 (172E)";
- break;
- case 20:
- os << "smc PENTAX-FA 28-80mm F3.5-5.6";
- break;
- case 22:
- os << "TOKINA 28-80mm F3.5-5.6";
- break;
- case 23:
- os << "smc PENTAX-FA 20-35mm F4 AL";
- break;
- case 24:
- os << "smc PENTAX-FA 77mm F1.8 Limited";
- break;
- case 25:
- os << "TAMRON SP AF 14mm F2.8";
- break;
- case 26:
- os << "smc PENTAX-FA MACRO 100mm F3.5";
- break;
- case 27:
- os << "TAMRON AF28-300mm F/3.5-6.3 LD Aspherical[IF] MACRO (285D)";
- break;
- case 28:
- os << "smc PENTAX-FA 35mm F2 AL";
- break;
- case 29:
- os << "TAMRON AF 28-200mm F/3.8-5.6 LD Super II MACRO (371D)";
- break;
- case 34:
- os << "smc PENTAX-FA 24-90mm F3.5-4.5 AL[IF]";
- break;
- case 35:
- os << "smc PENTAX-FA 100-300mm F4.7-5.8";
- break;
- case 36:
- os << "TAMRON AF70-300mm F/4-5.6 LD MACRO";
- break;
- case 37:
- os << "TAMRON SP AF 24-135mm F3.5-5.6 AD AL (190D)";
- break;
- case 38:
- os << "smc PENTAX-FA 28-105mm F3.2-4.5 AL[IF]";
- break;
- case 39:
- os << "smc PENTAX-FA 31mm F1.8AL Limited";
- break;
- case 41:
- os << "TAMRON AF 28-200mm Super Zoom F3.8-5.6 Aspherical XR [IF] MACRO (A03)";
- break;
- case 43:
- os << "smc PENTAX-FA 28-90mm F3.5-5.6";
- break;
- case 44:
- os << "smc PENTAX-FA J 75-300mm F4.5-5.8 AL";
- break;
- case 45:
- os << "TAMRON 28-300mm F3.5-6.3 Ultra zoom XR";
- break;
- case 46:
- os << "smc PENTAX-FA J 28-80mm F3.5-5.6 AL";
- break;
- case 47:
- os << "smc PENTAX-FA J 18-35mm F4-5.6 AL";
- break;
- case 49:
- os << "TAMRON SP AF 28-75mm F2.8 XR Di (A09)";
- break;
- case 51:
- os << "smc PENTAX-D FA 50mm F2.8 MACRO";
- break;
- case 52:
- os << "smc PENTAX-D FA 100mm F2.8 MACRO";
- break;
- case 244:
- os << "smc PENTAX-DA 21mm F3.2 AL Limited";
- break;
- case 245:
- os << "Schneider D-XENON 50-200mm";
- break;
- case 246:
- os << "Schneider D-XENON 18-55mm";
- break;
- case 247:
- os << "smc PENTAX-DA 10-17mm F3.5-4.5 ED [IF] Fisheye zoom";
- break;
- case 248:
- os << "smc PENTAX-DA 12-24mm F4 ED AL [IF]";
- break;
- case 249:
- os << "TAMRON XR DiII 18-200mm F3.5-6.3 (A14)";
- break;
- case 250:
- os << "smc PENTAX-DA 50-200mm F4-5.6 ED";
- break;
- case 251:
- os << "smc PENTAX-DA 40mm F2.8 Limited";
- break;
- case 252:
- os << "smc PENTAX-DA 18-55mm F3.5-5.6 AL";
- break;
- case 253:
- os << "smc PENTAX-DA 14mm F2.8 ED[IF]";
- break;
- case 254:
- os << "smc PENTAX-DA 16-45mm F4 ED AL";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- break;
- case 5:
- switch (l1) {
- case 1:
- os << "smc PENTAX-FA* 24mm F2 AL[IF]";
- break;
- case 2:
- os << "smc PENTAX-FA 28mm F2.8 AL";
- break;
- case 3:
- os << "smc PENTAX-FA 50mm F1.7";
- break;
- case 4:
- os << "smc PENTAX-FA 50mm F1.4";
- break;
- case 5:
- os << "smc PENTAX-FA* 600mm F4 ED[IF]";
- break;
- case 6:
- os << "smc PENTAX-FA* 300mm F4.5 ED[IF]";
- break;
- case 7:
- os << "smc PENTAX-FA 135mm F2.8 [IF]";
- break;
- case 8:
- os << "smc PENTAX-FA MACRO 50mm F2.8";
- break;
- case 9:
- os << "smc PENTAX-FA MACRO 100mm F2.8";
- break;
- case 10:
- os << "smc PENTAX-FA* 85mm F1.4 [IF]";
- break;
- case 11:
- os << "smc PENTAX-FA* 200mm F2.8 ED[IF]";
- break;
- case 12:
- os << "smc PENTAX-FA 28-80mm F3.5-4.7";
- break;
- case 13:
- os << "smc PENTAX-FA 70-200mm F4-5.6";
- break;
- case 14:
- os << "smc PENTAX-FA* 250-600mm F5.6 ED[IF]";
- break;
- case 15:
- os << "smc PENTAX-FA 28-105mm F4-5.6";
- break;
- case 16:
- os << "smc PENTAX-FA 100-300mm F4.5-5.6";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- break;
- case 6:
- switch (l1) {
- case 1:
- os << "smc PENTAX-FA* 85mm F1.4[IF]";
- break;
- case 2:
- os << "smc PENTAX-FA* 200mm F2.8 ED[IF]";
- break;
- case 3:
- os << "smc PENTAX-FA* 300mm F2.8 ED[IF]";
- break;
- case 4:
- os << "smc PENTAX-FA* 28-70mm F2.8 AL";
- break;
- case 5:
- os << "smc PENTAX-FA* 80-200mm F2.8 ED[IF]";
- break;
- case 6:
- os << "smc PENTAX-FA* 28-70mm F2.8 AL";
- break;
- case 7:
- os << "smc PENTAX-FA* 80-200mm F2.8 ED[IF]";
- break;
- case 8:
- os << "smc PENTAX-FA 28-70mm F4AL";
- break;
- case 9:
- os << "smc PENTAX-FA 20mm F2.8";
- break;
- case 10:
- os << "smc PENTAX-FA* 400mm F5.6 ED[IF]";
- break;
- case 13:
- os << "smc PENTAX-FA* 400mm F5.6 ED[IF]";
- break;
- case 14:
- os << "smc PENTAX-FA* MACRO 200mm F4 ED[IF]";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- break;
- case 7:
- switch (l1) {
- case 0:
- os << "smc PENTAX-DA 21mm F3.2 AL Limited";
- break;
- case 238:
- os << "TAMRON AF 18-250mm F3.5-6.3 Di II LD Aspherical [IF] MACRO";
- break;
- case 243:
- os << "smc PENTAX-DA 70mm F2.4 Limited";
- break;
- case 244:
- os << "smc PENTAX-DA 21mm F3.2 AL Limited";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- break;
- case 8:
- switch (l1) {
- case 241:
- os << "smc PENTAX-DA* 50-135mm F2.8 ED [IF] SDM";
- break;
- case 242:
- os << "smc PENTAX-DA* 16-50mm F2.8 ED AL [IF] SDM";
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- break;
- default:
- os << _("Unknown") << " (" << l0 << " " << l1 << ")";
- break;
- }
- return os;
- }
-
// Pentax MakerNote Tag Info
const TagInfo PentaxMakerNote::tagInfo_[] = {
TagInfo(0x0000, "Version", N_("Version"),
@@ -1198,7 +802,6 @@ namespace Exiv2 {
TagInfo(0x0016, "ExposureCompensation", N_("Exposure compensation"),
N_("Exposure compensation"),
pentaxIfdId, makerTags, unsignedLong, printPentaxCompensation),
-
/* Some missing ! */
TagInfo(0x0017, "MeteringMode", N_("MeteringMode"),
N_("MeteringMode"),
@@ -1248,13 +851,13 @@ namespace Exiv2 {
/* Some missing ! */
TagInfo(0x0032, "ImageProcessing", N_("Image processing"),
N_("Image processing"),
- pentaxIfdId, makerTags, undefined, printPentaxImageProcessing),
+ pentaxIfdId, makerTags, undefined, EXV_PRINT_COMBITAG(pentaxImageProcessing, 4)),
TagInfo(0x0033, "PictureMode", N_("Picture mode"),
N_("Picture mode"),
- pentaxIfdId, makerTags, undefined, printPentaxPictureMode),
+ pentaxIfdId, makerTags, undefined, EXV_PRINT_COMBITAG(pentaxPictureMode, 3)),
TagInfo(0x0034, "DriveMode", N_("Drive mode"),
N_("Drive mode"),
- pentaxIfdId, makerTags, undefined, printPentaxDriveMode),
+ pentaxIfdId, makerTags, undefined, EXV_PRINT_COMBITAG(pentaxDriveMode, 4)),
/* Some missing ! */
TagInfo(0x0037, "ColorSpace", N_("Color space"),
N_("Color space"),
@@ -1262,7 +865,7 @@ namespace Exiv2 {
/* Some missing ! */
TagInfo(0x003f, "LensType", N_("Lens type"),
N_("Lens type"),
- pentaxIfdId, makerTags, unsignedLong, printPentaxLensType),
+ pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_COMBITAG(pentaxLensType, 2)),
/* Some missing ! */
TagInfo(0x0041, "DigitalFilter", N_("Digital filter"),
N_("Digital filter"),
@@ -1290,7 +893,6 @@ namespace Exiv2 {
TagInfo(0x005d, "ShutterCount", N_("Shutter count"),
N_("Shutter count"),
pentaxIfdId, makerTags, undefined, printValue), /* TODO: This has some encryption by date (see exiftool) */
-
/* Many missing ! */
TagInfo(0x0200, "BlackPoint", N_("Black point"),
N_("Black point"),
@@ -1354,7 +956,6 @@ namespace Exiv2 {
TagInfo(0x0206, "Saturation", N_("Saturation"),
N_("Saturation"),
pentaxIfdId, makerTags, undefined, printValue), /* TODO: Decoding missing */
-
// End of list marker
TagInfo(0xffff, "(UnknownPentaxMakerNoteTag)", "(UnknownPentaxMakerNoteTag)",
N_("Unknown PentaxMakerNote tag"),
@@ -1381,8 +982,8 @@ namespace Exiv2 {
}
int PentaxMakerNote::readHeader(const byte* buf,
- long len,
- ByteOrder /*byteOrder*/)
+ long len,
+ ByteOrder /*byteOrder*/)
{
if (len < 6) return 1;
diff --git a/src/pentaxmn.hpp b/src/pentaxmn.hpp
index a0e976f..a33a101 100644
--- a/src/pentaxmn.hpp
+++ b/src/pentaxmn.hpp
@@ -21,7 +21,7 @@
/*!
@file pentaxmn.hpp
@brief Pentax MakerNote implemented according to the specification
- http://www.gvsoft.homedns.org/exif/makernote-pentax-type3.html and
+ http://www.gvsoft.homedns.org/exif/makernote-pentax-type3.html and
based on ExifTool implementation and
<a href="http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html">Pentax Makernote list</a> by Phil Harvey<br>
@version $Rev$
@@ -40,7 +40,8 @@
// + standard includes
#include <string>
-#include <iosfwd>
+#include <iostream>
+#include <iomanip>
#include <memory>
// *****************************************************************************
@@ -77,10 +78,10 @@ namespace Exiv2 {
deleted.
*/
MakerNote::AutoPtr createPentaxMakerNote(bool alloc,
- const byte* buf,
- long len,
- ByteOrder byteOrder,
- long offset);
+ const byte* buf,
+ long len,
+ ByteOrder byteOrder,
+ long offset);
// *****************************************************************************
// class definitions
@@ -138,10 +139,6 @@ namespace Exiv2 {
static std::ostream& printPentaxTemperature(std::ostream& os, const Value& value);
static std::ostream& printPentaxFlashCompensation(std::ostream& os, const Value& value);
static std::ostream& printPentaxBracketing(std::ostream& os, const Value& value);
- static std::ostream& printPentaxImageProcessing(std::ostream& os, const Value& value);
- static std::ostream& printPentaxPictureMode(std::ostream& os, const Value& value);
- static std::ostream& printPentaxDriveMode(std::ostream& os, const Value& value);
- static std::ostream& printPentaxLensType(std::ostream& os, const Value& value);
private:
//! Internal virtual create function.
@@ -154,6 +151,40 @@ namespace Exiv2 {
}; // class PentaxMakerNote
static PentaxMakerNote::RegisterMn registerPentaxMakerNote;
+
+ /*!
+ @brief Print function to translate Pentax "combi-values" to a description
+ by looking up a reference table.
+ */
+ template <int N, const TagDetails (&array)[N], int count>
+ std::ostream& printCombiTag(std::ostream& os, const Value& value)
+ {
+ if (value.count() != count || count > 4) {
+ return printValue(os, value);
+ }
+ unsigned long l = 0;
+ for (int c = 0; c < count; ++c) {
+ if (value.toLong(c) < 0 || value.toLong(c) > 255) {
+ return printValue(os, value);
+ }
+ l += (value.toLong(c) << ((count - c - 1) * 8));
+ }
+ const TagDetails* td = find(array, l);
+ if (td) {
+ os << exvGettext(td->label_);
+ }
+ else {
+ os << exvGettext("Unknown") << " (0x"
+ << std::setw(2 * count) << std::setfill('0')
+ << std::hex << l << std::dec << ")";
+ }
+
+ return os;
+ }
+
+//! Shortcut for the printCombiTag template which requires typing the array name only once.
+#define EXV_PRINT_COMBITAG(array, count) printCombiTag<EXV_COUNTOF(array), array, count>
+
} // namespace Exiv2
#endif // #ifndef PENTAXMN_HPP_
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list