Drawing animated images using Symbian C++

From Nokia Developer 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 09:16.
54 page views in the last 30 days.