[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:44:48 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=7599632
The following commit has been merged in the master branch:
commit 759963280e280c11aa6712b406fb194543115c63
Author: Robin Mills <robin at clanmills.com>
Date: Wed Jan 14 11:19:38 2015 +0000
#917. Thank you Thomas for the patch. Very much appreciated.
---
src/actions.cpp | 33 +++++++++++++--------------------
test/data/bugfixes-test.out | Bin 123626 -> 123839 bytes
test/data/conversions.out | 20 ++++++++++----------
test/data/exiv2-test.out | 10 +++++-----
4 files changed, 28 insertions(+), 35 deletions(-)
diff --git a/src/actions.cpp b/src/actions.cpp
index 7e95358..59f8b26 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -513,47 +513,40 @@ namespace Action {
int Print::printMetadata(const Exiv2::Image* image)
{
- int rc = 0;
+ std::string sMissing;
if (Params::instance().printTags_ & Exiv2::mdExif) {
const Exiv2::ExifData& exifData = image->exifData();
for (Exiv2::ExifData::const_iterator md = exifData.begin();
md != exifData.end(); ++md) {
printMetadatum(*md, image);
}
- if (exifData.empty()) {
- if (Params::instance().verbose_) {
- std::cerr << path_ << ": " << _("No Exif data found in the file
");
- }
- rc = -3;
- }
+ if (exifData.empty()) sMissing = "Exif" ;
}
+
if (Params::instance().printTags_ & Exiv2::mdIptc) {
const Exiv2::IptcData& iptcData = image->iptcData();
for (Exiv2::IptcData::const_iterator md = iptcData.begin();
md != iptcData.end(); ++md) {
printMetadatum(*md, image);
}
- if (iptcData.empty()) {
- if (Params::instance().verbose_) {
- std::cerr << path_ << ": " << _("No IPTC data found in the file
");
- }
- rc = -3;
- }
+ if (iptcData.empty()) sMissing = "IPTC" ;
}
+
if (Params::instance().printTags_ & Exiv2::mdXmp) {
const Exiv2::XmpData& xmpData = image->xmpData();
for (Exiv2::XmpData::const_iterator md = xmpData.begin();
md != xmpData.end(); ++md) {
printMetadatum(*md, image);
}
- if (xmpData.empty()) {
- if (Params::instance().verbose_) {
- std::cerr << path_ << ": " << _("No XMP data found in the file
");
- }
- rc = -3;
- }
+ if (xmpData.empty()) sMissing = "XMP" ;
}
- return rc;
+
+ bool bTagFilterGiven = !Params::instance().keys_.empty(); // were tag filters given with -g?
+ int result = ( sMissing.empty() && !bTagFilterGiven ) ? 0 : -3;
+ if ( result ) {
+ std::cerr << path_ << ": " << "(No " << sMissing << " data found in the file)
";
+ }
+ return result;
} // Print::printMetadata
bool Print::grepTag(const std::string& key)
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 5c9c3fc..0a4322e 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/conversions.out b/test/data/conversions.out
index 45d6094..f4041c0 100644
--- a/test/data/conversions.out
+++ b/test/data/conversions.out
@@ -25,9 +25,9 @@ Warning: Failed to convert Xmp.dc.description to Iptc.Application2.Caption
Warning: Failed to convert Xmp.dc.description to Exif.Image.ImageDescription
Xmp.dc.description LangAlt 2 lang="de-DE" The Exif image description, lang="it-IT" Ciao bella
File 1/1: k.jpg
-k.jpg: No Exif data found in the file
+k.jpg: (No Exif data found in the file)
File 1/1: k.jpg
-k.jpg: No IPTC data found in the file
+k.jpg: (No IPTC data found in the file)
Testcase 5
==========
@@ -46,7 +46,7 @@ Exif.Photo.UserComment Undefined 59 charset="Jis" This i
Xmp.exif.UserComment LangAlt 1 lang="x-default" This is a JIS encoded Exif user comment. Or was it?
Exif.Photo.UserComment Undefined 110 charset="Unicode" This is a JIS encoded Exif user comment. Or was it?
File 1/1: m.xmp
-m.xmp: No IPTC data found in the file
+m.xmp: (No IPTC data found in the file)
Testcase 7
==========
@@ -54,7 +54,7 @@ Xmp.exif.UserComment LangAlt 1 lang="x-default" Thi
Exif.Image.ExifTag Long 1 26
Exif.Photo.UserComment Undefined 110 charset="Unicode" This is a JIS encoded Exif user comment. Or was it?
File 1/1: n.jpg
-n.jpg: No IPTC data found in the file
+n.jpg: (No IPTC data found in the file)
Testcase 8
==========
@@ -63,7 +63,7 @@ Iptc.Application2.Keywords String 5 Drugs
Iptc.Application2.Keywords String 11 Rock'n'roll
Xmp.dc.subject XmpBag 3 Sex, Drugs, Rock'n'roll
File 1/1: o.xmp
-o.xmp: No Exif data found in the file
+o.xmp: (No Exif data found in the file)
Iptc.Application2.Keywords String 3 Sex
Iptc.Application2.Keywords String 5 Drugs
Iptc.Application2.Keywords String 11 Rock'n'roll
@@ -73,7 +73,7 @@ Testcase 9
==========
Xmp.dc.subject XmpBag 3 Sex, Drugs, Rock'n'roll
File 1/1: p.jpg
-p.jpg: No Exif data found in the file
+p.jpg: (No Exif data found in the file)
Iptc.Envelope.CharacterSet String 3 $%G
Iptc.Application2.Keywords String 3 Sex
Iptc.Application2.Keywords String 5 Drugs
@@ -85,21 +85,21 @@ Exif.Image.Software Ascii 6 Exiv2
Xmp.tiff.Software XmpText 5 Exiv2
Exif.Image.Software Ascii 6 Exiv2
File 1/1: q.xmp
-q.xmp: No IPTC data found in the file
+q.xmp: (No IPTC data found in the file)
Testcase 11
===========
Xmp.tiff.Software XmpText 5 Exiv2
Exif.Image.Software Ascii 6 Exiv2
File 1/1: r.jpg
-r.jpg: No IPTC data found in the file
+r.jpg: (No IPTC data found in the file)
Testcase 12
===========
Iptc.Application2.SubLocation String 12 Kuala Lumpur
Xmp.iptc.Location XmpText 12 Kuala Lumpur
File 1/1: s.xmp
-s.xmp: No Exif data found in the file
+s.xmp: (No Exif data found in the file)
Iptc.Application2.SubLocation String 12 Kuala Lumpur
Iptc.Envelope.CharacterSet String 3 $%G
@@ -107,7 +107,7 @@ Testcase 13
===========
Xmp.iptc.Location XmpText 12 Kuala Lumpur
File 1/1: t.jpg
-t.jpg: No Exif data found in the file
+t.jpg: (No Exif data found in the file)
Iptc.Envelope.CharacterSet String 3 $%G
Iptc.Application2.SubLocation String 12 Kuala Lumpur
diff --git a/test/data/exiv2-test.out b/test/data/exiv2-test.out
index 03e0766..b2d9bd8 100644
--- a/test/data/exiv2-test.out
+++ b/test/data/exiv2-test.out
@@ -21,7 +21,7 @@ Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
Exiv2 help ---------------------------------------------------------------
-Usage: lt-exiv2 [ options ] [ action ] file ...
+Usage: exiv2 [ options ] [ action ] file ...
Manipulate the Exif metadata of images.
@@ -602,7 +602,7 @@ File 15/15: 20060127_225027.jpg
20060127_225027.jpg Exif comment :
File 1/15: exiv2-empty.jpg
-exiv2-empty.jpg: No Exif data found in the file
+exiv2-empty.jpg: (No Exif data found in the file)
File 2/15: 20031214_000043.jpg
20031214_000043.jpg Exif.Image.Make Ascii 6 Canon
20031214_000043.jpg Exif.Image.Model Ascii 20 Canon PowerShot S40
@@ -2143,7 +2143,7 @@ File 15/15: 20060127_225027.jpg
20060127_225027.jpg Exif.Thumbnail.ResolutionUnit Short 1 inch
20060127_225027.jpg Exif.Thumbnail.JPEGInterchangeFormat Long 1 2548
20060127_225027.jpg Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 6137
-exiv2-empty.jpg: No Exif data found in the file
+exiv2-empty.jpg: (No Exif data found in the file)
Error: Directory Canon: Next pointer is out of bounds; ignored.
Extract Exif data --------------------------------------------------------
@@ -2211,7 +2211,7 @@ File 14/15: 20001004_015404.jpg
Writing thumbnail (image/jpeg, 13824 Bytes) to file ./20001004_015404-thumb.jpg
File 15/15: 20060127_225027.jpg
Writing thumbnail (image/jpeg, 6137 Bytes) to file ./20060127_225027-thumb.jpg
-exiv2-empty.exv: No Exif data found in the file
+exiv2-empty.exv: (No Exif data found in the file)
Compare image data and extracted data ------------------------------------
1,1540c1,1540
@@ -5513,7 +5513,7 @@ File 14/15: 20001004_015404.jpg
Writing Exif data from ./20001004_015404.exv to 20001004_015404.jpg
File 15/15: 20060127_225027.jpg
Writing Exif data from ./20060127_225027.exv to 20060127_225027.jpg
-exiv2-empty.exv: No Exif data found in the file
+exiv2-empty.exv: (No Exif data found in the file)
Compare original and inserted image data ---------------------------------
1,1540c1,1540
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list