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. Thanks for all your past and future contributions.

How can I access metadata in JPEG images using Symbian C++

From Wiki
Jump to: navigation, search
Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 3rd Edition
S60 3rd Edition (initial release)
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (24 May 2005)
Last edited: hamishwillee (14 Jun 2013)


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 =
        CImageDecoder::FileNewL(aFs, aFileName);
    HBufC* metaData = NULL;
    if (aIndex >= 0 && aIndex < decoder->NumberOfImageComments())
        metaData = decoder->ImageCommentL(aIndex);
    CleanupStack::PopAndDestroy(); // decoder
    return metaData;

This page was last modified on 14 June 2013, at 06:00.
30 page views in the last 30 days.