[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:39:13 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=cd9aa48
The following commit has been merged in the master branch:
commit cd9aa48676ba795fa9525b5c113ec9d198529f80
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Fri Jan 25 01:55:37 2008 +0000
More print functions added (intermediate version, by webustany for GHOP 98).
---
src/properties.cpp | 14 +++++++++++++-
src/tags.cpp | 18 ++++++++++++++++++
src/tags.hpp | 2 ++
src/xmp.cpp | 1 +
4 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/src/properties.cpp b/src/properties.cpp
index 560819e..a215b8a 100644
--- a/src/properties.cpp
+++ b/src/properties.cpp
@@ -813,7 +813,19 @@ namespace Exiv2 {
{"Xmp.exif.GPSStatus", EXV_PRINT_TAG(xmpExifGPSStatus)},
{"Xmp.exif.GPSTrackRef", EXV_PRINT_TAG(xmpExifGPSDirection)},
{"Xmp.tiff.XResolution", printLong},
- {"Xmp.tiff.YResolution", printLong}
+ {"Xmp.tiff.YResolution", printLong},
+ {"Xmp.exif.DateTimeOriginal", printDate},
+ {"Xmp.exif.GPSTimeStamp", printDate},
+ {"Xmp.exif.CreateDate", printDate},
+ {"Xmp.exif.ModifyDate", printDate},
+ {"Xmp.exif.ApertureValue", print0x9202},
+ {"Xmp.exif.FNumber", print0x9202},
+ {"Xmp.exif.BrightnessValue", printLong},
+ {"Xmp.exif.ExposureBiasValue", printLong},
+ {"Xmp.exif.FocalLength", print0x920a},
+ {"Xmp.exif.FocalPlaneXResolution", printFloat},
+ {"Xmp.exif.FocalPlaneYResolution", printFloat},
+ {"Xmp.exif.ShutterSpeedValue", print0x9201}
};
XmpNsInfo::Ns::Ns(const std::string& ns)
diff --git a/src/tags.cpp b/src/tags.cpp
index 82223b9..109bf52 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -2037,6 +2037,24 @@ namespace Exiv2 {
return os;
}
+ std::ostream& printDate(std::ostream& os, const Value& value)
+ {
+ if (value.size() != 20 || value.typeId() != xmpText) {
+ return os << "(" << value << ")";
+ }
+
+ std::string stringValue = value.toString();
+ if (stringValue[19] == 'Z') {
+ stringValue = stringValue.substr(0, 19);
+ }
+ for (unsigned int i = 0; i < stringValue.length(); ++i) {
+ if (stringValue[i] == 'T') stringValue[i] = ' ';
+ if (stringValue[i] == '-') stringValue[i] = ':';
+ }
+
+ return os << stringValue;
+ }
+
float fnumber(float apertureValue)
{
return static_cast<float>(std::exp(std::log(2.0) * apertureValue / 2));
diff --git a/src/tags.hpp b/src/tags.hpp
index 6b813bc..a9a741e 100644
--- a/src/tags.hpp
+++ b/src/tags.hpp
@@ -479,6 +479,8 @@ namespace Exiv2 {
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);
+ //! Print a date following the format YYYY-MM-DDTHH:MM:SSZ
+ std::ostream& printDate(std::ostream& os, const Value& value);
//@}
//! Calculate F number from an APEX aperture value
diff --git a/src/xmp.cpp b/src/xmp.cpp
index 087c3b6..3ea3e75 100644
--- a/src/xmp.cpp
+++ b/src/xmp.cpp
@@ -667,6 +667,7 @@ namespace Exiv2 {
// *************************************************************************
// free functions
+
std::ostream& operator<<(std::ostream& os, const Xmpdatum& md)
{
return XmpProperties::printProperty(os, md.key(), md.value());
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list