Sign In
New User? Sign Up
exiv2
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
You can set the sort order of messages? Just click on the link in the date column. Your preferences will be remembered, so you don't have to do it again when you return.

Messages

  Messages Help
Advanced
LangAltValue   Message List  
Reply | Forward Message #1127 of 1513 |
Re: LangAltValue

> Maybe an overloaded version of the toString() accessor
> that takes a (const std::string &) parameter?

Added that. Since the virtual method LangAltValue::toString(long n)
didn't do anything at all, I changed it to return the text value
associated with the default language qualifier "x-default" (for any
n). I don't think that's particularly good, just better than nothing.
If anybody has a better idea, please let me know. In the meantime, you
can now write

std::string copyright;

const Exiv2::XmpData& xmpData = image->xmpData();
Exiv2::XmpData::const_iterator xmpIter =
xmpData.findKey(Exiv2::XmpKey("Xmp.dc.rights"));

if(xmpIter != xmpData.end() && xmpIter->typeId() == Exiv2::langAlt)
{
copyright = xmpIter->toString(0);
}

Thanks for the feedback, Marco

-ahu.





Thu May 1, 2008 8:44 am

zzzahu
Offline Offline
Send Email Send Email

Forward
Message #1127 of 1513 |
Expand Messages Author Sort by Date

Hello, I'm writing some code that uses libexiv2 to retrieve some XMP tags from an image, such as the "dc:rights" property (aka the copyright notice). The code...
Marco Piovanelli
piovanel
Offline Send Email
Apr 30, 2008
5:03 pm

... Added that. Since the virtual method LangAltValue::toString(long n) didn't do anything at all, I changed it to return the text value associated with the...
Andreas Huggel
zzzahu
Offline Send Email
May 1, 2008
8:44 am

On Thu, 1 May 2008 08:44:36 +0000, ... Sounds good. ... Thank you for the prompt reaction. -- marco -- It's not the data universe only, it's human...
Marco Piovanelli
piovanel
Offline Send Email
May 1, 2008
3:02 pm
Advanced

Copyright © 2009 Yahoo! UK. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help