×
Namespaces

Variants
Actions

Reading a frame from a GIF image using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Compatibility
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Article
Created: User:Technical writer 2 (10 Feb 2004)
Last edited: lpvalente (20 Jul 2014)

Overview

Reading a frame from a GIF image.

Description

How can I read a frame from a GIF image (animated GIF with several frames)?

The following source code demonstrates how to modify the Bmpmanip example to read a required frame from a GIF image file.

Open the CBmpmanipAppView implementation included in the S60 SDK (\Series60Ex\bmpmanip\src\bmpmanipappview.cpp) and modify it as follows:

TFrameInfo frameInfo;
// Find the desired frame from the GIF
// image and assign it to gifFrameIndex
// Get the frame info
iConverter->FrameInfo(gifFrameIndex, frameInfo);
// Create a bitmap based on the size of the gif
TInt err = iBitmap->Create(frameInfo.iOverallSizeInPixels,
KDeviceColourDepth);
if (err == KErrCouldNotConnect)
{
// handle errors
}
// Convert the GIF frame into a bitmap
TRAPD(convertErr, iConverter->ConvertL(*iBitmap, gifFrameIndex));
This page was last modified on 20 July 2014, at 22:09.
81 page views in the last 30 days.
×