Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
How can I access metadata in JPEG images using Symbian C++
JPEG (or other formats, such as GIF and PNG) images can contain metadata information. This solution describes how to access metadata from the code.
In S60 1st Edition, there is no interface that could be used to obtain the metadata of the image.
In S60 2nd Edition, the text comments added as metadata can be obtained with the CImageDecoder's ImageCommentL method.
Example code for S60 2nd Edition:
HBufC* CImageHandler::GetMetaDataL(RFs& aFs, const TFileName& aFileName, TInt aIndex)
CImageDecoder* decoder =
HBufC* metaData = NULL;
if (aIndex >= 0 && aIndex < decoder->NumberOfImageComments())
metaData = decoder->ImageCommentL(aIndex);
CleanupStack::PopAndDestroy(); // decoder