Added printVersion (by webustany for GHOP 98).
This commit is contained in:
+1
-1
@@ -578,7 +578,7 @@ namespace Exiv2 {
|
||||
const TagInfo Nikon3MakerNote::tagInfo_[] = {
|
||||
TagInfo(0x0001, "Version", N_("Version"),
|
||||
N_("Nikon Makernote version"),
|
||||
nikon3IfdId, makerTags, undefined, printValue),
|
||||
nikon3IfdId, makerTags, undefined, printVersion),
|
||||
TagInfo(0x0002, "ISOSpeed", N_("ISO Speed"),
|
||||
N_("ISO speed setting"),
|
||||
nikon3IfdId, makerTags, unsignedShort, print0x0002),
|
||||
|
||||
+23
-3
@@ -721,7 +721,7 @@ namespace Exiv2 {
|
||||
TagInfo(0x9000, "ExifVersion", N_("Exif Version"),
|
||||
N_("The version of this standard supported. Nonexistence of this "
|
||||
"field is taken to mean nonconformance to the standard."),
|
||||
exifIfdId, exifVersion, undefined, printValue),
|
||||
exifIfdId, exifVersion, undefined, printVersion),
|
||||
TagInfo(0x9003, "DateTimeOriginal", N_("Date and Time (original)"),
|
||||
N_("The date and time when the original image data was generated. "
|
||||
"For a digital still camera the date and time the picture was taken are recorded."),
|
||||
@@ -803,7 +803,7 @@ namespace Exiv2 {
|
||||
exifIfdId, dateTime, asciiString, printValue),
|
||||
TagInfo(0xa000, "FlashpixVersion", N_("FlashPix Version"),
|
||||
N_("The FlashPix format version supported by a FPXR file."),
|
||||
exifIfdId, exifVersion, undefined, printValue),
|
||||
exifIfdId, exifVersion, undefined, printVersion),
|
||||
TagInfo(0xa001, "ColorSpace", N_("Color Space"),
|
||||
N_("The color space information tag is always "
|
||||
"recorded as the color space specifier. Normally sRGB "
|
||||
@@ -1161,7 +1161,7 @@ namespace Exiv2 {
|
||||
iopIfdId, iopTags, asciiString, printValue),
|
||||
TagInfo(0x0002, "InteroperabilityVersion", N_("Interoperability Version"),
|
||||
N_("Interoperability version"),
|
||||
iopIfdId, iopTags, undefined, printValue),
|
||||
iopIfdId, iopTags, undefined, printVersion),
|
||||
TagInfo(0x1000, "RelatedImageFileFormat", N_("Related Image File Format"),
|
||||
N_("File format of image file"),
|
||||
iopIfdId, iopTags, asciiString, printValue),
|
||||
@@ -2002,6 +2002,26 @@ namespace Exiv2 {
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& printVersion(std::ostream& os, const Value& value)
|
||||
{
|
||||
if (value.size() != 4 || value.typeId() != undefined) {
|
||||
return os << "(" << value << ")";
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
/* Strip an eventual non significative digit */
|
||||
if (value.toLong(0) == '0') {
|
||||
i++;
|
||||
}
|
||||
for (; i < 4 ; ++i) {
|
||||
os << static_cast<char>(value.toLong(i));
|
||||
if (i == 1) {
|
||||
os << '.';
|
||||
}
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
float fnumber(float apertureValue)
|
||||
{
|
||||
return static_cast<float>(std::exp(std::log(2.0) * apertureValue / 2));
|
||||
|
||||
@@ -475,6 +475,8 @@ namespace Exiv2 {
|
||||
std::ostream& print0xa404(std::ostream& os, const Value& value);
|
||||
//! Print 35mm equivalent focal length
|
||||
std::ostream& print0xa405(std::ostream& os, const Value& value);
|
||||
//! Print any version packed in 4 Bytes format : major major minor minor
|
||||
std::ostream& printVersion(std::ostream& os, const Value& value);
|
||||
//@}
|
||||
|
||||
//! Calculate F number from an APEX aperture value
|
||||
|
||||
Reference in New Issue
Block a user