Skip to content

Commit

Permalink
fixed XMP and IPTC entry names in exif pane
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Mar 15, 2009
1 parent 972f0c2 commit 1e7fe2f
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/exiv2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,27 @@ gchar *exif_get_tag_description_by_key(const gchar *key)
{
try {
Exiv2::ExifKey ekey(key);
return utf8_validate_or_convert(Exiv2::ExifTags::tagLabel(ekey.tag(), ekey.ifdId ()));
return utf8_validate_or_convert(ekey.tagLabel().c_str());
}
catch (Exiv2::AnyError& e) {
std::cout << "Caught Exiv2 exception '" << e << "'\n";
return NULL;
try {
Exiv2::IptcKey ikey(key);
return utf8_validate_or_convert(ikey.tagLabel().c_str());
}
catch (Exiv2::AnyError& e) {
try {
#if EXIV2_TEST_VERSION(0,16,0)
Exiv2::XmpKey xkey(key);
return utf8_validate_or_convert(xkey.tagLabel().c_str());
#endif
}
catch (Exiv2::AnyError& e) {
std::cout << "Caught Exiv2 exception '" << e << "'\n";
return NULL;
}
}
}
return NULL;
}

static const AltKey *find_alt_key(const gchar *xmp_key)
Expand Down

0 comments on commit 1e7fe2f

Please sign in to comment.