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++
S60 3rd Edition (initial release)
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.