[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:54 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=2a41b24
The following commit has been merged in the master branch:
commit 2a41b2475e0a00ef6878f5f91c4b2c1109c4bad8
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat Sep 30 07:55:12 2006 +0000
Added pretty-print function for GPSTimeStamp
---
src/tags.cpp | 31 ++++++++++++++++++++++++++++++-
src/tags.hpp | 2 ++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/tags.cpp b/src/tags.cpp
index 3a070a8..1ad2aaa 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -528,7 +528,7 @@ namespace Exiv2 {
TagInfo(0x0004, "GPSLongitude", "GPSLongitude", "Longitude", gpsIfdId, gpsTags, unsignedRational, printDegrees),
TagInfo(0x0005, "GPSAltitudeRef", "GPSAltitudeRef", "Altitude reference", gpsIfdId, gpsTags, unsignedByte, EXV_PRINT_TAG(exifGPSAltitudeRef)),
TagInfo(0x0006, "GPSAltitude", "GPSAltitude", "Altitude", gpsIfdId, gpsTags, unsignedRational, print0x0006),
- TagInfo(0x0007, "GPSTimeStamp", "GPSTimeStamp", "GPS time (atomic clock)", gpsIfdId, gpsTags, unsignedRational, printValue),
+ TagInfo(0x0007, "GPSTimeStamp", "GPSTimeStamp", "GPS time (atomic clock)", gpsIfdId, gpsTags, unsignedRational, print0x0007),
TagInfo(0x0008, "GPSSatellites", "GPSSatellites", "GPS satellites used for measurement", gpsIfdId, gpsTags, asciiString, printValue),
TagInfo(0x0009, "GPSStatus", "GPSStatus", "GPS receiver status", gpsIfdId, gpsTags, asciiString, printValue),
TagInfo(0x000a, "GPSMeasureMode", "GPSMeasureMode", "GPS measurement mode", gpsIfdId, gpsTags, asciiString, printValue),
@@ -1087,6 +1087,35 @@ namespace Exiv2 {
return os;
}
+ std::ostream& print0x0007(std::ostream& os, const Value& value)
+ {
+ if (value.count() == 3) {
+ std::ostringstream oss;
+ oss.copyfmt(os);
+ const float sec = 3600 * value.toFloat(0)
+ + 60 * value.toFloat(1)
+ + value.toFloat(2);
+ int p = 0;
+ if (sec != static_cast<int>(sec)) p = 1;
+
+ const int hh = static_cast<int>(sec / 3600);
+ const int mm = static_cast<int>((sec - 3600 * hh) / 60);
+ const float ss = sec - 3600 * hh - 60 * mm;
+
+ os << std::setw(2) << std::setfill('0') << std::right << hh << ":"
+ << std::setw(2) << std::setfill('0') << std::right << mm << ":"
+ << std::setw(2 + p * 2) << std::setfill('0') << std::right
+ << std::fixed << std::setprecision(p) << ss;
+
+ os.copyfmt(oss);
+ }
+ else {
+ os << value;
+ }
+
+ return os;
+ }
+
std::ostream& print0x8298(std::ostream& os, const Value& value)
{
// Print the copyright information in the format Photographer, Editor
diff --git a/src/tags.hpp b/src/tags.hpp
index cdf90a8..3ac8911 100644
--- a/src/tags.hpp
+++ b/src/tags.hpp
@@ -437,6 +437,8 @@ namespace Exiv2 {
//! Print GPS altitude
std::ostream& print0x0006(std::ostream& os, const Value& value);
+ //! Print GPS timestamp
+ std::ostream& print0x0007(std::ostream& os, const Value& value);
//! Print the copyright
std::ostream& print0x8298(std::ostream& os, const Value& value);
//! Print the exposure time
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list