From 58ae0b0752f1bd6521f0165c547b0f0ad0bcd16f Mon Sep 17 00:00:00 2001 From: clanmills Date: Sat, 7 Nov 2020 20:36:24 +0000 Subject: [PATCH 1/6] fix_929_exif2.31_0.27 --- src/tags_int.cpp | 39 +++++++++++++++++++++++++++++++++++++++ src/tags_int.hpp | 2 ++ 2 files changed, 41 insertions(+) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index f29b1e34..ae2bcc20 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -834,6 +834,12 @@ namespace Exiv2 { "version of a TIFF/EP file, eg '1', '0', '0', '0'"), ifd0Id, tiffEp, unsignedByte, 4, printValue), // TIFF/EP Tag TagInfo(0x9217, "SensingMethod", N_("Sensing Method"), N_("Type of image sensor."), ifd0Id, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag + TagInfo(0x9400, "Temperature", N_("Temperature"), N_("Shooting situation."), ifd0Id, otherTags, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9401, "Humidity", N_("Humidity"), N_("Shooting situation."), ifd0Id, otherTags, unsignedRational, 1, printValue), // TExif 2.31 + TagInfo(0x9402, "Pressure", N_("Pressure"), N_("Shooting situation."), ifd0Id, otherTags, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), N_("Shooting situation."), ifd0Id, otherTags, signedRational, 1, printValue), // TExif 2.31 + TagInfo(0x9404, "Acceleration", N_("Acceleration"), N_("Shooting situation."), ifd0Id, otherTags, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), N_("Shooting situation."), ifd0Id, otherTags, signedRational, 1, printValue), // TIFF/EP tag TagInfo(0x9c9b, "XPTitle", N_("Windows Title"), N_("Title tag used by Windows, encoded in UCS2"), ifd0Id, otherTags, unsignedByte, -1, printUcs2), // Windows Tag @@ -1500,6 +1506,15 @@ namespace Exiv2 { TagInfo(0x9004, "DateTimeDigitized", N_("Date and Time (digitized)"), N_("The date and time when the image was stored as digital data."), exifId, dateTime, asciiString, 20, printValue), + TagInfo(0x9010, "OffsetTime", N_("Offset Time"), + N_("Time difference from Universal Time Coordinated including daylight saving time of DateTime tag."), + exifId, dateTime, asciiString, 7, printValue), // Exif 2.31 + TagInfo(0x9011, "OffsetTimeOriginal", N_("Offset Time Original"), + N_("Time difference from Universal Time Coordinated including daylight saving time of DateTimeOriginal tag."), + exifId, dateTime, asciiString, 7, printValue), // Exif 2.31 + TagInfo(0x9012, "OffsetTimeDigitized", N_("Offset Time Digitized"), + N_("Time difference from Universal Time Coordinated including daylight saving time of DateTimeDigitized tag."), + exifId, dateTime, asciiString, 7, printValue), // Exif 2.31 TagInfo(0x9101, "ComponentsConfiguration", N_("Components Configuration"), N_("Information specific to compressed data. The channels of " "each component are arranged in order from the 1st " @@ -1752,6 +1767,15 @@ namespace Exiv2 { N_("This tag records the serial number of the interchangeable lens " "that was used in photography as an ASCII string."), exifId, otherTags, asciiString, 0, printValue), + TagInfo(0xa460, "CompositeImage", N_("Composite Image"), // Exif 2.32 + N_("This tag indicates whether the recorded image is a composite image* or not."), + exifId, captureCond, unsignedShort, 1, printCompositeImage), + TagInfo(0xa461, "SourceImageNumberOfCompositeImage", N_("Source Image Number Of Composite Image"), // Exif 2.32 + N_("This tag indicates the distance to the subject."), + exifId, captureCond, unsignedShort, 2, printValue), + TagInfo(0xa462, "SourceExposureTimesOfCompositeImage", N_("Source Exposure Times Of Composite Image"), // Exif 2.32 + N_("This tag indicates the distance to the subject."), + exifId, captureCond, undefined, 1, print0xa40c), // End of list marker TagInfo(0xffff, "(UnknownExifTag)", N_("Unknown Exif tag"), N_("Unknown Exif tag"), @@ -1925,6 +1949,9 @@ namespace Exiv2 { TagInfo(0x001e, "GPSDifferential", N_("GPS Differential"), N_("Indicates whether differential correction is applied to the GPS receiver."), gpsId, gpsTags, unsignedShort, 1, print0x001e), + TagInfo(0x001f, "GPSHPositioningError", N_("GPS Horizontal positioning error"), + N_("This tag indicates horizontal positioning errors in meters."), + gpsId, gpsTags, unsignedRational, 1, print0x001e), // End of list marker TagInfo(0xffff, "(UnknownGpsTag)", N_("Unknown GPSInfo tag"), N_("Unknown GPSInfo tag"), @@ -2833,6 +2860,18 @@ namespace Exiv2 { return EXV_PRINT_TAG(exifNormalSoftHard)(os, value, metadata); } + extern const TagDetails exifCompositeImage[] = { + { 0, N_("Unknown") }, + { 1, N_("NonComposite") }, + { 2, N_("GeneralComposite") }, + { 3, N_("CompositeCapturedWhenShooting") } + }; + + std::ostream& printCompositeImage(std::ostream& os, const Value& value, const ExifData* metadata) + { + return EXV_PRINT_TAG(exifCompositeImage)(os, value, metadata); + } + std::ostream& printExifVersion(std::ostream& os, const Value& value, const ExifData*) { if (value.size() != 4 || value.typeId() != undefined) { diff --git a/src/tags_int.hpp b/src/tags_int.hpp index 1ff40801..602657dc 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -434,6 +434,8 @@ namespace Exiv2 { std::ostream& printGPSDirRef(std::ostream& os, const Value& value, const ExifData*); //! Print contrast, sharpness (normal, soft, hard) std::ostream& printNormalSoftHard(std::ostream& os, const Value& value, const ExifData*); + //! Print compositeImage (unknown, , nonComposite, generalComposite,compositeCapturedWhenShooting) + std::ostream& printCompositeImage(std::ostream& os, const Value& value, const ExifData*); //! Print any version packed in 4 Bytes format : major major minor minor std::ostream& printExifVersion(std::ostream& os, const Value& value, const ExifData*); //! Print any version encoded in the ASCII string majormajorminorminor From a59a382961ef26a8dd484640b02ce5857f27b439 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Thu, 19 Nov 2020 15:40:50 +0000 Subject: [PATCH 2/6] I hope I've made a better job of this at this attempt. I don't thing the "section" enum is of much importance. I don't believe anything in particular is done with with it. ```cpp /*! @brief Section identifiers to logically group tags. A section consists of nothing more than a name, based on the Exif standard. */ enum SectionId { sectionIdNotSet, imgStruct, recOffset, imgCharacter, otherTags, exifFormat, exifVersion, imgConfig, userInfo, relatedFile, dateTime, captureCond, gpsTags, iopTags, mpfTags, makerTags, dngTags, panaRaw, tiffEp, tiffPm6, adobeOpi, lastSectionId }; ``` I pleased with the documentation and drawing I have added to the book concerning the Exif Specification. https://clanmills.com/exiv2/book/#Exif --- src/tags_int.cpp | 22 +++++++++++----------- src/tags_int.hpp | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index ae2bcc20..a6378edf 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -833,13 +833,13 @@ namespace Exiv2 { N_("Contains four ASCII characters representing the TIFF/EP standard " "version of a TIFF/EP file, eg '1', '0', '0', '0'"), ifd0Id, tiffEp, unsignedByte, 4, printValue), // TIFF/EP Tag - TagInfo(0x9217, "SensingMethod", N_("Sensing Method"), N_("Type of image sensor."), ifd0Id, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag - TagInfo(0x9400, "Temperature", N_("Temperature"), N_("Shooting situation."), ifd0Id, otherTags, signedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9401, "Humidity", N_("Humidity"), N_("Shooting situation."), ifd0Id, otherTags, unsignedRational, 1, printValue), // TExif 2.31 - TagInfo(0x9402, "Pressure", N_("Pressure"), N_("Shooting situation."), ifd0Id, otherTags, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), N_("Shooting situation."), ifd0Id, otherTags, signedRational, 1, printValue), // TExif 2.31 - TagInfo(0x9404, "Acceleration", N_("Acceleration"), N_("Shooting situation."), ifd0Id, otherTags, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), N_("Shooting situation."), ifd0Id, otherTags, signedRational, 1, printValue), // TIFF/EP tag + TagInfo(0x9217, "SensingMethod", N_("Sensing Method"), N_("Type of image sensor."), exifId, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag + TagInfo(0x9400, "Temperature", N_("Temperature"), N_("Temperature as the ambient situation at the shot, for example the room temperature where the photographer was holding the camera. The unit is degrees C"), exifId, otherTags, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9401, "Humidity", N_("Humidity"), N_("Humidity as the ambient situation at the shot, for example the room humidity where the photographer was holding the camera. The unit is %."), exifId, otherTags, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9402, "Pressure", N_("Pressure"), N_("Pressure as the ambient situation at the shot, for example the room atmospfere where the photographer was holding the camera or the water pressure under the sea. The unit is hPa."), exifId, otherTags, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), N_("Water depth as the ambient situation at the shot, for example the water depth of the camera at underwater photography. The unit is m."), exifId, otherTags, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9404, "Acceleration", N_("Acceleration"), N_("Acceleration (a scalar regardless of direction) as the ambient situation at the shot, for example the driving acceleration of the vehicle which the photographer rode on at the shot. The unit is mGal (10-5 m/s2). "), exifId, otherTags, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), N_("Elevation/depression. angle of the orientation of the camera(imaging optical axis) as the ambient situation at the shot. The unit is degrees."), exifId, otherTags, signedRational, 1, printValue), // Exif 2.31 TagInfo(0x9c9b, "XPTitle", N_("Windows Title"), N_("Title tag used by Windows, encoded in UCS2"), ifd0Id, otherTags, unsignedByte, -1, printUcs2), // Windows Tag @@ -1768,14 +1768,14 @@ namespace Exiv2 { "that was used in photography as an ASCII string."), exifId, otherTags, asciiString, 0, printValue), TagInfo(0xa460, "CompositeImage", N_("Composite Image"), // Exif 2.32 - N_("This tag indicates whether the recorded image is a composite image* or not."), + N_("Indicates whether the recorded image is a composite image or not."), exifId, captureCond, unsignedShort, 1, printCompositeImage), TagInfo(0xa461, "SourceImageNumberOfCompositeImage", N_("Source Image Number Of Composite Image"), // Exif 2.32 - N_("This tag indicates the distance to the subject."), + N_("Indicates the number of the source images (tentatively recorded images) captured for a composite Image."), exifId, captureCond, unsignedShort, 2, printValue), TagInfo(0xa462, "SourceExposureTimesOfCompositeImage", N_("Source Exposure Times Of Composite Image"), // Exif 2.32 - N_("This tag indicates the distance to the subject."), - exifId, captureCond, undefined, 1, print0xa40c), + N_("For a composite image, records the parameters relating exposure time of the exposures for generating the said composite image, such as respective exposure times of captured source images (tentatively recorded images)."), + exifId, captureCond, undefined, 0, printValue), // End of list marker TagInfo(0xffff, "(UnknownExifTag)", N_("Unknown Exif tag"), N_("Unknown Exif tag"), diff --git a/src/tags_int.hpp b/src/tags_int.hpp index 602657dc..ef76994f 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -434,7 +434,7 @@ namespace Exiv2 { std::ostream& printGPSDirRef(std::ostream& os, const Value& value, const ExifData*); //! Print contrast, sharpness (normal, soft, hard) std::ostream& printNormalSoftHard(std::ostream& os, const Value& value, const ExifData*); - //! Print compositeImage (unknown, , nonComposite, generalComposite,compositeCapturedWhenShooting) + //! Print compositeImage (unknown, nonComposite, generalComposite,compositeCapturedWhenShooting) std::ostream& printCompositeImage(std::ostream& os, const Value& value, const ExifData*); //! Print any version packed in 4 Bytes format : major major minor minor std::ostream& printExifVersion(std::ostream& os, const Value& value, const ExifData*); From 4c52891549ea8c51be40e7adf9864ef271d52a28 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Thu, 19 Nov 2020 15:48:14 +0000 Subject: [PATCH 3/6] Fix tag GPSHPositioningError to use printValue() pretty-printer. --- src/tags_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index a6378edf..ed85e2c0 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -1951,7 +1951,7 @@ namespace Exiv2 { gpsId, gpsTags, unsignedShort, 1, print0x001e), TagInfo(0x001f, "GPSHPositioningError", N_("GPS Horizontal positioning error"), N_("This tag indicates horizontal positioning errors in meters."), - gpsId, gpsTags, unsignedRational, 1, print0x001e), + gpsId, gpsTags, unsignedRational, 1, printValue), // End of list marker TagInfo(0xffff, "(UnknownGpsTag)", N_("Unknown GPSInfo tag"), N_("Unknown GPSInfo tag"), From 829ed7da155cab418e6c888550b5307529c7f97a Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Fri, 20 Nov 2020 10:02:32 +0000 Subject: [PATCH 4/6] Clarified definition and use of enum SectionId @kmilos: please review/approve. --- src/tags_int.cpp | 12 ++++++------ src/tags_int.hpp | 24 ++++++++++++++++++++---- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index ed85e2c0..59d2c75d 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -834,12 +834,12 @@ namespace Exiv2 { "version of a TIFF/EP file, eg '1', '0', '0', '0'"), ifd0Id, tiffEp, unsignedByte, 4, printValue), // TIFF/EP Tag TagInfo(0x9217, "SensingMethod", N_("Sensing Method"), N_("Type of image sensor."), exifId, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag - TagInfo(0x9400, "Temperature", N_("Temperature"), N_("Temperature as the ambient situation at the shot, for example the room temperature where the photographer was holding the camera. The unit is degrees C"), exifId, otherTags, signedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9401, "Humidity", N_("Humidity"), N_("Humidity as the ambient situation at the shot, for example the room humidity where the photographer was holding the camera. The unit is %."), exifId, otherTags, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9402, "Pressure", N_("Pressure"), N_("Pressure as the ambient situation at the shot, for example the room atmospfere where the photographer was holding the camera or the water pressure under the sea. The unit is hPa."), exifId, otherTags, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), N_("Water depth as the ambient situation at the shot, for example the water depth of the camera at underwater photography. The unit is m."), exifId, otherTags, signedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9404, "Acceleration", N_("Acceleration"), N_("Acceleration (a scalar regardless of direction) as the ambient situation at the shot, for example the driving acceleration of the vehicle which the photographer rode on at the shot. The unit is mGal (10-5 m/s2). "), exifId, otherTags, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), N_("Elevation/depression. angle of the orientation of the camera(imaging optical axis) as the ambient situation at the shot. The unit is degrees."), exifId, otherTags, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9400, "Temperature", N_("Temperature"), N_("Temperature as the ambient situation at the shot, for example the room temperature where the photographer was holding the camera. The unit is degrees C"), exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9401, "Humidity", N_("Humidity"), N_("Humidity as the ambient situation at the shot, for example the room humidity where the photographer was holding the camera. The unit is %."), exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9402, "Pressure", N_("Pressure"), N_("Pressure as the ambient situation at the shot, for example the room atmospfere where the photographer was holding the camera or the water pressure under the sea. The unit is hPa."), exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), N_("Water depth as the ambient situation at the shot, for example the water depth of the camera at underwater photography. The unit is m."), exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9404, "Acceleration", N_("Acceleration"), N_("Acceleration (a scalar regardless of direction) as the ambient situation at the shot, for example the driving acceleration of the vehicle which the photographer rode on at the shot. The unit is mGal (10-5 m/s2). "), exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), N_("Elevation/depression. angle of the orientation of the camera(imaging optical axis) as the ambient situation at the shot. The unit is degrees."), exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 TagInfo(0x9c9b, "XPTitle", N_("Windows Title"), N_("Title tag used by Windows, encoded in UCS2"), ifd0Id, otherTags, unsignedByte, -1, printUcs2), // Windows Tag diff --git a/src/tags_int.hpp b/src/tags_int.hpp index ef76994f..6c8e2fd6 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -169,10 +169,26 @@ namespace Exiv2 { of nothing more than a name, based on the Exif standard. */ enum SectionId { sectionIdNotSet, - imgStruct, recOffset, imgCharacter, otherTags, exifFormat, - exifVersion, imgConfig, userInfo, relatedFile, dateTime, - captureCond, gpsTags, iopTags, mpfTags, makerTags, dngTags, panaRaw, - tiffEp, tiffPm6, adobeOpi, + imgStruct, // 4.6.4 A + recOffset, // 4.6.4 B + imgCharacter, // 4.6.4 C + otherTags, // 4.6.4 D + exifFormat, // 4.6.3 + exifVersion, // 4.6.5 A + imgConfig, // 4.6.5 C + userInfo, // 4.6.5 D + relatedFile, // 4.6.5 E + dateTime, // 4.6.5 F + captureCond, // 4.6.5 G + gpsTags, // 4.6.6 + iopTags, // 4.6.7 + mpfTags, + makerTags, // MakerNote + dngTags, // DNG Spec + panaRaw, + tiffEp, // TIFF-EP Spec + tiffPm6, + adobeOpi, lastSectionId }; //! The details of a section. From c688ed448dd4070b83dcb60da2d026665a0c2bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 20 Nov 2020 21:19:58 +0100 Subject: [PATCH 5/6] Moved ambient tags to Exif only list, other refactoring Handle more TIFF/EP vs Exif differences Moved translated values (GPS, Exif) closer to their respective lists --- src/tags_int.cpp | 182 ++++++++++++++++++++++++++++------------------- src/tags_int.hpp | 2 - 2 files changed, 110 insertions(+), 74 deletions(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 59d2c75d..11a0d55d 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -177,44 +177,6 @@ namespace Exiv2 { { 3, N_("cm") } }; - //! GPS altitude reference, tag 0x0005 - extern const TagDetails exifGPSAltitudeRef[] = { - { 0, N_("Above sea level") }, - { 1, N_("Below sea level") } - }; - - //! GPS status, tag 0x0009 - extern const TagDetails exifGPSStatus[] = { - { 'A', N_("Measurement in progress") }, - { 'V', N_("Measurement Interoperability") } - }; - - //! GPS measurement mode, tag 0x000a - extern const TagDetails exifGPSMeasureMode[] = { - { '2', N_("Two-dimensional measurement") }, - { '3', N_("Three-dimensional measurement") } - }; - - //! GPS speed reference, tag 0x000c - extern const TagDetails exifGPSSpeedRef[] = { - { 'K', N_("km/h") }, - { 'M', N_("mph") }, - { 'N', N_("knots") } - }; - - //! GPS Destination distance ref, tag 0x0019 - extern const TagDetails exifGPSDestDistanceRef[] = { - { 'K', N_("Kilometers") }, - { 'M', N_("Miles") }, - { 'N', N_("Knots") } - }; - - //! GPS Differential, tag 0x001e - extern const TagDetails exifGPSDifferential[] = { - { 0, N_("Without correction") }, - { 1, N_("Correction applied") } - }; - //! Orientation, tag 0x0112 extern const TagDetails exifOrientation[] = { { 1, N_("top, left") }, @@ -378,6 +340,28 @@ namespace Exiv2 { { 0x5f, N_("Yes, auto, red-eye reduction, return light detected") } }; + //! FocalPlaneResolutionUnit, TIFF/EP tag 0x9210 + extern const TagDetails tiffFocalPlaneResolutionUnit[] = { + { 1, N_("inch") }, + { 2, N_("meter") }, + { 3, N_("centimeter") }, + { 4, N_("millimeter") }, + { 5, N_("micrometer") } + }; + + //! SensingMethod, TIFF/EP tag 0x9217 + extern const TagDetails tiffSensingMethod[] = { + { 0, N_("Undefined") }, + { 1, N_("Monochrome area") }, + { 2, N_("One-chip color area") }, + { 3, N_("Two-chip color area") }, + { 4, N_("Three-chip color area") }, + { 5, N_("Color sequential area") }, + { 6, N_("Monochrome linear") }, + { 7, N_("Trilinear sensor") }, + { 8, N_("Color sequential linear") } + }; + //! CFALayout, tag 0xc617 extern const TagDetails exifCfaLayout[] = { { 1, N_("Rectangular (or square) layout") }, @@ -818,28 +802,24 @@ namespace Exiv2 { TagInfo(0x9208, "LightSource", N_("Light Source"), N_("The kind of light source."), ifd0Id, tiffEp, unsignedShort, 1, print0x9208), // TIFF/EP tag TagInfo(0x9209, "Flash", N_("Flash"), N_("Indicates the status of flash when the image was shot."), ifd0Id, tiffEp, unsignedShort, 1, EXV_PRINT_TAG(exifFlash)), // TIFF/EP tag TagInfo(0x920a, "FocalLength", N_("Focal Length"), N_("The actual focal length of the lens, in mm."), ifd0Id, tiffEp, unsignedRational, 1, print0x920a), // TIFF/EP tag - TagInfo(0x920b, "FlashEnergy", N_("Flash Energy"), N_("Amount of flash energy (BCPS)."), ifd0Id, tiffEp, unsignedRational, 1, printValue), // TIFF/EP tag + TagInfo(0x920b, "FlashEnergy", N_("Flash Energy"), N_("Amount of flash energy (BCPS)."), ifd0Id, tiffEp, unsignedRational, 0, printValue), // TIFF/EP tag TagInfo(0x920c, "SpatialFrequencyResponse", N_("Spatial Frequency Response"), N_("SFR of the camera."), ifd0Id, tiffEp, undefined, 0, printValue), // TIFF/EP tag TagInfo(0x920d, "Noise", N_("Noise"), N_("Noise measurement values."), ifd0Id, tiffEp, undefined, 0, printValue), // TIFF/EP tag - TagInfo(0x920e, "FocalPlaneXResolution", N_("Focal Plane X Resolution"), N_("Number of pixels per FocalPlaneResolutionUnit (37392) in ImageWidth direction for main image."), ifd0Id, tiffEp, unsignedRational, 1, printValue), // TIFF/EP tag - TagInfo(0x920f, "FocalPlaneYResolution", N_("Focal Plane Y Resolution"), N_("Number of pixels per FocalPlaneResolutionUnit (37392) in ImageLength direction for main image."), ifd0Id, tiffEp, unsignedRational, 1, printValue), // TIFF/EP tag - TagInfo(0x9210, "FocalPlaneResolutionUnit", N_("Focal Plane Resolution Unit"), N_("Unit of measurement for FocalPlaneXResolution(37390) and FocalPlaneYResolution(37391)."), ifd0Id, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag + TagInfo(0x920e, "FocalPlaneXResolution", N_("Focal Plane X Resolution"), N_("Number of pixels per FocalPlaneResolutionUnit (37392) in ImageWidth direction for main image."), ifd0Id, tiffEp, unsignedRational, 1, printFloat), // TIFF/EP tag + TagInfo(0x920f, "FocalPlaneYResolution", N_("Focal Plane Y Resolution"), N_("Number of pixels per FocalPlaneResolutionUnit (37392) in ImageLength direction for main image."), ifd0Id, tiffEp, unsignedRational, 1, printFloat), // TIFF/EP tag + TagInfo(0x9210, "FocalPlaneResolutionUnit", N_("Focal Plane Resolution Unit"), N_("Unit of measurement for FocalPlaneXResolution(37390) and FocalPlaneYResolution(37391)."), ifd0Id, tiffEp, unsignedShort, 1, EXV_PRINT_TAG(tiffFocalPlaneResolutionUnit)), // TIFF/EP tag TagInfo(0x9211, "ImageNumber", N_("Image Number"), N_("Number assigned to an image, e.g., in a chained image burst."), ifd0Id, tiffEp, unsignedLong, 1, printValue), // TIFF/EP tag TagInfo(0x9212, "SecurityClassification", N_("Security Classification"), N_("Security classification assigned to the image."), ifd0Id, tiffEp, asciiString, 0, printValue), // TIFF/EP tag TagInfo(0x9213, "ImageHistory", N_("Image History"), N_("Record of what has been done to the image."), ifd0Id, tiffEp, asciiString, 0, printValue), // TIFF/EP tag TagInfo(0x9214, "SubjectLocation", N_("Subject Location"), N_("Indicates the location and area of the main subject in the overall scene."), ifd0Id, tiffEp, unsignedShort, 2, printValue), // TIFF/EP tag - TagInfo(0x9215, "ExposureIndex", N_("Exposure Index"), N_("Encodes the camera exposure index setting when image was captured."), ifd0Id, tiffEp, unsignedRational, 1, printValue), // TIFF/EP tag + TagInfo(0x9215, "ExposureIndex", N_("Exposure Index"), N_("Encodes the camera exposure index setting when image was captured."), ifd0Id, tiffEp, unsignedRational, 0, printValue), // TIFF/EP tag TagInfo(0x9216, "TIFFEPStandardID", N_("TIFF/EP Standard ID"), N_("Contains four ASCII characters representing the TIFF/EP standard " "version of a TIFF/EP file, eg '1', '0', '0', '0'"), ifd0Id, tiffEp, unsignedByte, 4, printValue), // TIFF/EP Tag - TagInfo(0x9217, "SensingMethod", N_("Sensing Method"), N_("Type of image sensor."), exifId, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag - TagInfo(0x9400, "Temperature", N_("Temperature"), N_("Temperature as the ambient situation at the shot, for example the room temperature where the photographer was holding the camera. The unit is degrees C"), exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9401, "Humidity", N_("Humidity"), N_("Humidity as the ambient situation at the shot, for example the room humidity where the photographer was holding the camera. The unit is %."), exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9402, "Pressure", N_("Pressure"), N_("Pressure as the ambient situation at the shot, for example the room atmospfere where the photographer was holding the camera or the water pressure under the sea. The unit is hPa."), exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), N_("Water depth as the ambient situation at the shot, for example the water depth of the camera at underwater photography. The unit is m."), exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9404, "Acceleration", N_("Acceleration"), N_("Acceleration (a scalar regardless of direction) as the ambient situation at the shot, for example the driving acceleration of the vehicle which the photographer rode on at the shot. The unit is mGal (10-5 m/s2). "), exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 - TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), N_("Elevation/depression. angle of the orientation of the camera(imaging optical axis) as the ambient situation at the shot. The unit is degrees."), exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9217, "SensingMethod", N_("Sensing Method"), + N_("Type of image sensor."), + ifd0Id, tiffEp, unsignedShort, 1, EXV_PRINT_TAG(tiffSensingMethod)), // TIFF/EP tag TagInfo(0x9c9b, "XPTitle", N_("Windows Title"), N_("Title tag used by Windows, encoded in UCS2"), ifd0Id, otherTags, unsignedByte, -1, printUcs2), // Windows Tag @@ -1437,6 +1417,14 @@ namespace Exiv2 { return ifdTagInfo; } + //! CompositeImage, tag 0xa460 + extern const TagDetails exifCompositeImage[] = { + { 0, N_("Unknown") }, + { 1, N_("NonComposite") }, + { 2, N_("GeneralComposite") }, + { 3, N_("CompositeCapturedWhenShooting") } + }; + // Exif IFD Tags static const TagInfo exifTagInfo[] = { TagInfo(0x829a, "ExposureTime", N_("Exposure Time"), @@ -1587,9 +1575,33 @@ namespace Exiv2 { TagInfo(0x9292, "SubSecTimeDigitized", N_("Sub-seconds Time Digitized"), N_("A tag used to record fractions of seconds for the tag."), exifId, dateTime, asciiString, 0, printValue), - TagInfo(0x9400, "AmbientTemperature", N_("AmbientTemperature"), - N_("AmbientTemperature"), - exifId, captureCond, signedRational, 0, printValue), + TagInfo(0x9400, "Temperature", N_("Temperature"), + N_("Temperature as the ambient situation at the shot, for example the room " + "temperature where the photographer was holding the camera. The unit is " + "degrees C."), + exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9401, "Humidity", N_("Humidity"), + N_("Humidity as the ambient situation at the shot, for example the room humidity " + "where the photographer was holding the camera. The unit is %."), + exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9402, "Pressure", N_("Pressure"), + N_("Pressure as the ambient situation at the shot, for example the room atmosphere " + "where the photographer was holding the camera or the water pressure under the sea. " + "The unit is hPa."), + exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9403, "WaterDepth", N_("WaterDepth"), + N_("Water depth as the ambient situation at the shot, for example the water depth " + "of the camera at underwater photography. The unit is m."), + exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9404, "Acceleration", N_("Acceleration"), + N_("Acceleration (a scalar regardless of direction) as the ambient situation at the " + "shot, for example the driving acceleration of the vehicle which the photographer " + "rode on at the shot. The unit is mGal (10e-5 m/s^2)."), + exifId, captureCond, unsignedRational, 1, printValue), // Exif 2.31 + TagInfo(0x9405, "CameraElevationAngle", N_("Camera elevation angle"), + N_("Elevation/depression. angle of the orientation of the camera(imaging optical " + "axis) as the ambient situation at the shot. The unit is degrees."), + exifId, captureCond, signedRational, 1, printValue), // Exif 2.31 TagInfo(0xa000, "FlashpixVersion", N_("FlashPix Version"), N_("The FlashPix format version supported by a FPXR file."), exifId, exifVersion, undefined, 4, printExifVersion), @@ -1767,15 +1779,15 @@ namespace Exiv2 { N_("This tag records the serial number of the interchangeable lens " "that was used in photography as an ASCII string."), exifId, otherTags, asciiString, 0, printValue), - TagInfo(0xa460, "CompositeImage", N_("Composite Image"), // Exif 2.32 + TagInfo(0xa460, "CompositeImage", N_("Composite Image"), N_("Indicates whether the recorded image is a composite image or not."), - exifId, captureCond, unsignedShort, 1, printCompositeImage), - TagInfo(0xa461, "SourceImageNumberOfCompositeImage", N_("Source Image Number Of Composite Image"), // Exif 2.32 - N_("Indicates the number of the source images (tentatively recorded images) captured for a composite Image."), - exifId, captureCond, unsignedShort, 2, printValue), - TagInfo(0xa462, "SourceExposureTimesOfCompositeImage", N_("Source Exposure Times Of Composite Image"), // Exif 2.32 + exifId, captureCond, unsignedShort, 1, EXV_PRINT_TAG(exifCompositeImage)), // Exif 2.32 + TagInfo(0xa461, "SourceImageNumberOfCompositeImage", N_("Source Image Number Of Composite Image"), + N_("Indicates the number of the source images (tentatively recorded images) captured for a composite Image."), + exifId, captureCond, unsignedShort, 2, printValue), // Exif 2.32 + TagInfo(0xa462, "SourceExposureTimesOfCompositeImage", N_("Source Exposure Times Of Composite Image"), N_("For a composite image, records the parameters relating exposure time of the exposures for generating the said composite image, such as respective exposure times of captured source images (tentatively recorded images)."), - exifId, captureCond, undefined, 0, printValue), + exifId, captureCond, undefined, 0, printValue), // Exif 2.32 // End of list marker TagInfo(0xffff, "(UnknownExifTag)", N_("Unknown Exif tag"), N_("Unknown Exif tag"), @@ -1799,6 +1811,44 @@ namespace Exiv2 { { 87, N_("West") } }; + //! GPS altitude reference, tag 0x0005 + extern const TagDetails exifGPSAltitudeRef[] = { + { 0, N_("Above sea level") }, + { 1, N_("Below sea level") } + }; + + //! GPS status, tag 0x0009 + extern const TagDetails exifGPSStatus[] = { + { 'A', N_("Measurement in progress") }, + { 'V', N_("Measurement Interoperability") } + }; + + //! GPS measurement mode, tag 0x000a + extern const TagDetails exifGPSMeasureMode[] = { + { '2', N_("Two-dimensional measurement") }, + { '3', N_("Three-dimensional measurement") } + }; + + //! GPS speed reference, tag 0x000c + extern const TagDetails exifGPSSpeedRef[] = { + { 'K', N_("km/h") }, + { 'M', N_("mph") }, + { 'N', N_("knots") } + }; + + //! GPS Destination distance ref, tag 0x0019 + extern const TagDetails exifGPSDestDistanceRef[] = { + { 'K', N_("Kilometers") }, + { 'M', N_("Miles") }, + { 'N', N_("Knots") } + }; + + //! GPS Differential, tag 0x001e + extern const TagDetails exifGPSDifferential[] = { + { 0, N_("Without correction") }, + { 1, N_("Correction applied") } + }; + // GPS Info Tags static const TagInfo gpsTagInfo[] = { TagInfo(0x0000, "GPSVersionID", N_("GPS Version ID"), @@ -2860,18 +2910,6 @@ namespace Exiv2 { return EXV_PRINT_TAG(exifNormalSoftHard)(os, value, metadata); } - extern const TagDetails exifCompositeImage[] = { - { 0, N_("Unknown") }, - { 1, N_("NonComposite") }, - { 2, N_("GeneralComposite") }, - { 3, N_("CompositeCapturedWhenShooting") } - }; - - std::ostream& printCompositeImage(std::ostream& os, const Value& value, const ExifData* metadata) - { - return EXV_PRINT_TAG(exifCompositeImage)(os, value, metadata); - } - std::ostream& printExifVersion(std::ostream& os, const Value& value, const ExifData*) { if (value.size() != 4 || value.typeId() != undefined) { diff --git a/src/tags_int.hpp b/src/tags_int.hpp index 6c8e2fd6..694624cc 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -450,8 +450,6 @@ namespace Exiv2 { std::ostream& printGPSDirRef(std::ostream& os, const Value& value, const ExifData*); //! Print contrast, sharpness (normal, soft, hard) std::ostream& printNormalSoftHard(std::ostream& os, const Value& value, const ExifData*); - //! Print compositeImage (unknown, nonComposite, generalComposite,compositeCapturedWhenShooting) - std::ostream& printCompositeImage(std::ostream& os, const Value& value, const ExifData*); //! Print any version packed in 4 Bytes format : major major minor minor std::ostream& printExifVersion(std::ostream& os, const Value& value, const ExifData*); //! Print any version encoded in the ASCII string majormajorminorminor From 5f9daf725bd53e2758ff4e28dc37fd38a8d00644 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 21 Nov 2020 10:15:20 +0000 Subject: [PATCH 6/6] Moved orphaned declaration of exifGPSDirRef. --- src/tags_int.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 11a0d55d..d2c2fa8e 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -1836,6 +1836,12 @@ namespace Exiv2 { { 'N', N_("knots") } }; + //! GPS direction ref, tags 0x000e, 0x0010, 0x0017 + extern const TagDetails exifGPSDirRef[] = { + { 'T', N_("True direction") }, + { 'M', N_("Magnetic direction") } + }; + //! GPS Destination distance ref, tag 0x0019 extern const TagDetails exifGPSDestDistanceRef[] = { { 'K', N_("Kilometers") }, @@ -2887,12 +2893,6 @@ namespace Exiv2 { return EXV_PRINT_TAG(exifSubjectDistanceRange)(os, value, metadata); } - //! GPS direction ref, tags 0x000e, 0x0010, 0x0017 - extern const TagDetails exifGPSDirRef[] = { - { 'T', N_("True direction") }, - { 'M', N_("Magnetic direction") } - }; - std::ostream& printGPSDirRef(std::ostream& os, const Value& value, const ExifData* metadata) { return EXV_PRINT_TAG(exifGPSDirRef)(os, value, metadata);