Skip to content

Commit

Permalink
Merge pull request #1389 from Exiv2/fix_929_exif2.31_0.27
Browse files Browse the repository at this point in the history
fix_929_exif2.32_0.27
  • Loading branch information
clanmills authored Nov 21, 2020
2 parents 4017f79 + 5f9daf7 commit e045fd6
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 57 deletions.
183 changes: 130 additions & 53 deletions src/tags_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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") },
Expand Down Expand Up @@ -413,6 +375,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") },
Expand Down Expand Up @@ -898,22 +882,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."), ifd0Id, tiffEp, unsignedShort, 1, printValue), // TIFF/EP tag
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
Expand Down Expand Up @@ -1517,6 +1503,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"),
Expand Down Expand Up @@ -1586,6 +1580,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 "
Expand Down Expand Up @@ -1658,9 +1661,33 @@ namespace Exiv2 {
TagInfo(0x9292, "SubSecTimeDigitized", N_("Sub-seconds Time Digitized"),
N_("A tag used to record fractions of seconds for the <DateTimeDigitized> 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),
Expand Down Expand Up @@ -1838,6 +1865,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"),
N_("Indicates whether the recorded image is a composite image or not."),
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), // Exif 2.32
// End of list marker
TagInfo(0xffff, "(UnknownExifTag)", N_("Unknown Exif tag"),
N_("Unknown Exif tag"),
Expand All @@ -1861,6 +1897,50 @@ 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 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") },
{ '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"),
Expand Down Expand Up @@ -2011,6 +2091,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, printValue),
// End of list marker
TagInfo(0xffff, "(UnknownGpsTag)", N_("Unknown GPSInfo tag"),
N_("Unknown GPSInfo tag"),
Expand Down Expand Up @@ -2871,12 +2954,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);
Expand Down
24 changes: 20 additions & 4 deletions src/tags_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e045fd6

Please sign in to comment.