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.

Drawing animated images using Symbian C++

From Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Created: User:Technical writer 2 (30 Nov 2006)
Last edited: hamishwillee (14 Jun 2012)


Drawing animated images


Applications can draw animated images on their custom UI controls using the CImageDecoder class from ICL (Image Converter Library). The source for the images can be, e.g., an animated GIF file.


ICL allows conversion of animated (multi-frame) images to CFbsBitmap bitmaps using CImageDecoder::Convert(). CImageDecoder::FrameCount() returns the total number of frames in the image file and CImageDecoder::FrameInfo(TInt aFrameNumber = 0) returns the information about each frame.
A call to CImageDecoder::Convert() must be done for each frame. The conversion is asynchronous; once completed, the requested frame is returned as a CFbsBitmap instance.
The delay between frames can be obtained from the TFrameInfo class. Using this information, each CFbsBitmap can then be drawn frame by frame to reproduce the animation.
Note: The class CPAlbImageViewerBasic has been used to draw animated images in S60 2nd Edition. However, it has been removed in S60 3rd Edition.

This page was last modified on 14 June 2012, at 06:16.
17 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.