diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp index 2b64c872..f9a75935 100644 --- a/src/nikonmn.cpp +++ b/src/nikonmn.cpp @@ -717,14 +717,14 @@ namespace Exiv2 { { return tagInfoPc_; } - + //! OnOff extern const TagDetails aftOnOff[] = { { 0, N_("Off") }, { 1, N_("On") }, { 2, N_("On") } }; - + // Nikon3 AF Fine Tune const TagInfo Nikon3MakerNote::tagInfoAFT_[] = { TagInfo(0, "AFFineTune", N_("AF Fine Tune"), N_("AF fine tune"), nikonAFTId, makerTags, unsignedByte, 1, EXV_PRINT_TAG(aftOnOff)), @@ -733,7 +733,7 @@ namespace Exiv2 { // End of list marker TagInfo(0xffff, "(UnknownNikonAFTTag)", "(UnknownNikonAFTTag)", N_("Unknown Nikon AF Fine Tune Tag"), nikonAFTId, makerTags, unsignedByte, 1, printValue) }; - + const TagInfo* Nikon3MakerNote::tagListAFT() { return tagInfoAFT_; @@ -1747,7 +1747,7 @@ namespace Exiv2 { // // // Seven misidentified lenses due to double LensIDs: -// +// // 2F 48 30 44 24 24 29 02.1: Nikon AF Zoom-Nikkor 20-35mm f/2.8D IF // 2F 48 30 44 24 24 29 02.2: Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8) // @@ -1951,11 +1951,11 @@ fmountlens[] = { {0x81,0x54,0x80,0x80,0x18,0x18,0x86,0x0E,0x03,0x00,0x00, "Nikon", "JAA336DA", "AF-S VR Nikkor 200mm f/2G IF-ED"}, {0x82,0x48,0x8E,0x8E,0x24,0x24,0x87,0x0E,0x13,0x00,0x00, "Nikon", "JAA337DA", "AF-S VR Nikkor 300mm f/2.8G IF-ED"}, {0x83,0x00,0xB0,0xB0,0x5A,0x5A,0x88,0x04,0x00,0x00,0x00, "Nikon", "", "FSA-L2, EDG 65, 800mm F13 G"}, -//84 -//85 +//84 +//85 //86 //87 -//88 +//88 {0x89,0x3C,0x53,0x80,0x30,0x3C,0x8B,0x06,0x01,0x00,0x00, "Nikon", "JAA793DA", "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"}, {0x8A,0x54,0x6A,0x6A,0x24,0x24,0x8C,0x0E,0x53,0x00,0x00, "Nikon", "JAA630DA", "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"}, {0x8B,0x40,0x2D,0x80,0x2C,0x3C,0x8D,0x0E,0x01,0x00,0x00, "Nikon", "JAA794DA", "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"}, @@ -2329,10 +2329,10 @@ fmountlens[] = { {0x06,0x3F,0x68,0x68,0x2C,0x2C,0x06,0x00,0x00,0x00,0x00, "Cosina", "", "AF 100mm F3.5 Macro"}, {0x07,0x36,0x3D,0x5F,0x2C,0x3C,0x03,0x00,0x00,0x00,0x00, "Cosina", "", "AF Zoom 28-80mm F3.5-5.6 MC Macro"}, {0x07,0x46,0x3D,0x6A,0x25,0x2F,0x03,0x00,0x00,0x00,0x00, "Cosina", "", "AF Zoom 28-105mm F2.8-3.8 MC"}, -//M "Cosina" "" "AF Zoom 28-210mm F3.5-5.6"; +//M "Cosina" "" "AF Zoom 28-210mm F3.5-5.6"; //M "Cosina" "" "AF Zoom 28-210mm F4.2-6.5 Aspherical IF"; -//M "Cosina" "" "AF Zoom 28-300mm F4.0-6.3"; -//M "Cosina" "" "AF Zoom 70-210mm F2.8-4.0"; +//M "Cosina" "" "AF Zoom 28-300mm F4.0-6.3"; +//M "Cosina" "" "AF Zoom 70-210mm F2.8-4.0"; {0x12,0x36,0x5C,0x81,0x35,0x3D,0x09,0x00,0x00,0x00,0x00, "Cosina", "", "AF Zoom 70-210mm F4.5-5.6 MC Macro"}, {0x12,0x39,0x5C,0x8E,0x34,0x3D,0x08,0x02,0x00,0x00,0x00, "Cosina", "", "AF Zoom 70-300mm F4.5-5.6 MC Macro"}, {0x12,0x3B,0x68,0x8D,0x3D,0x43,0x09,0x02,0x00,0x00,0x00, "Cosina", "", "AF Zoom 100-300mm F5.6-6.7 MC Macro"}, @@ -2464,8 +2464,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printAperture(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printAperture(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2483,8 +2483,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printFocal(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printFocal(std::ostream& os, + const Value& value, const ExifData*) { if (value.count() != 1 || value.typeId() != unsignedByte) { @@ -2498,8 +2498,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printFStops(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printFStops(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2517,8 +2517,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printExitPupilPosition(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printExitPupilPosition(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2536,8 +2536,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printFlashFocalLength(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printFlashFocalLength(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2554,8 +2554,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printRepeatingFlashRate(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printRepeatingFlashRate(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2570,8 +2570,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printRepeatingFlashCount(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printRepeatingFlashCount(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2586,8 +2586,8 @@ fmountlens[] = { return os; } - std::ostream& Nikon3MakerNote::printTimeZone(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printTimeZone(std::ostream& os, + const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); @@ -2599,17 +2599,17 @@ fmountlens[] = { std::ostringstream oss; oss.copyfmt(os); char sign = value.toLong() < 0 ? '-' : '+'; - long h = long(std::abs( (int) (value.toFloat()/60.0) )); - long min = long(std::abs( (int) (value.toFloat()-h*60) )); - os << std::fixed << "UTC " << sign << std::setw(2) << std::setfill('0') << h << ":" + long h = long(std::abs( (int) (value.toFloat()/60.0) ))%24; + long min = long(std::abs( (int) (value.toFloat()-h*60) ))%60; + os << std::fixed << "UTC " << sign << std::setw(2) << std::setfill('0') << h << ":" << std::setw(2) << std::setfill('0') << min; os.copyfmt(oss); os.flags(f); return os; } - std::ostream& Nikon3MakerNote::printPictureControl(std::ostream& os, - const Value& value, + std::ostream& Nikon3MakerNote::printPictureControl(std::ostream& os, + const Value& value, const ExifData*) { if (value.count() != 1 || value.typeId() != unsignedByte) { diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh index 6ff9d32d..54a83642 100755 --- a/test/bugfixes-test.sh +++ b/test/bugfixes-test.sh @@ -363,6 +363,13 @@ source ./functions.source runTest exiv2 -M'set Xmp.dc.title' $filename runTest exiv2 -px $filename + num=1062 + filename=exiv2-bug$num.jpg + printf "$num " >&3 + echo '------>' Bug $num '<-------' >&2 + copyTestFile $filename + runTest exiv2 -pa -g zone $filename + ) 3>&1 > $results 2>&1 printf "\n" diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out index 02d8ce7d..e1e5662f 100644 Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ diff --git a/test/data/exiv2-bug1062.jpg b/test/data/exiv2-bug1062.jpg new file mode 100644 index 00000000..5a543d1c Binary files /dev/null and b/test/data/exiv2-bug1062.jpg differ