diff --git a/src/properties.cpp b/src/properties.cpp index 553f929a..91cdacf8 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -896,9 +896,8 @@ namespace Exiv2 { { const XmpPropertyInfo* pl = propertyList(prefix); if (pl) { - const int ck = sizeof(pl) / sizeof(pl[0]); - for (int k = 0; k < ck; ++k) { - os << pl[k]; + for (int i = 0; pl[i].name_ != 0; ++i) { + os << pl[i]; } } diff --git a/src/taglist.cpp b/src/taglist.cpp index 5c6c325a..0032244d 100644 --- a/src/taglist.cpp +++ b/src/taglist.cpp @@ -11,6 +11,7 @@ #include "makernote.hpp" #include "tags.hpp" #include "datasets.hpp" +#include "properties.hpp" #include "error.hpp" #include @@ -40,10 +41,16 @@ try { IfdId ifdId = ExifTags::ifdIdByIfdItem(item); if (ExifTags::isMakerIfd(ifdId)) { ExifTags::makerTaglist(std::cout, ifdId); + break; + } + + try { + XmpProperties::printProperties(std::cout, item); } - else { + catch(const AnyError& e) { rc = 2; } + break; } case 1: @@ -55,7 +62,8 @@ try { } if (rc) { std::cout << "Usage: " << argv[0] - << " [Exif|Canon|CanonCs|CanonSi|CanonCf|Fujifilm|Minolta|Nikon1|Nikon2|Nikon3|Olympus|Panasonic|Pentax|Sigma|Sony|Iptc]\n" + << " [Exif|Canon|CanonCs|CanonSi|CanonCf|Fujifilm|Minolta|Nikon1|Nikon2|Nikon3|Olympus|Panasonic|Pentax|Sigma|Sony|Iptc" + << "|dc|xmp|xmpRights|xmpMM|xmpBJ|xmpTPg|xmpDM|pdf|photoshop|crs|tiff|exif|aux|iptc]\n" << "Print Exif tags, MakerNote tags, or Iptc datasets\n"; } return rc;