You Are Here:

Community: Wiki

This page was last modified on 29 March 2009, at 12:00.

Gif animation for symbian 2nd and 3rd edition phones

From Forum Nokia Wiki

Gif Animation for symbian 2nd edition phones

Derive your application container class from MPAlbAnimationObserver, and declare these

CPAlbImageViewerBasic* iViewer ;
void Notify( TAnimationEvent aEvent );

And, in your container,Animation method/function use this code. Dont forget to return count in CountComponentControls() and iViewer pointer in ComponetControl() methods.

iViewer = CPAlbImageViewerBasic::NewL(this,aRect);
iViewer->SetAnimationObserver(this,ETrue); //for looping
iViewer->LoadImageL(_L("c:\\nokia\\images\\anim.gif"),EColor4K);
iViewer->PlayAnimationL(); // support image and animation

Symbian 3rd edition phones

Headers Required:

#include <ICLAnimationDataProvider.h> //CICLAnimationDataProvider
#include <BasicAnimation.h > //CBasicAnimation

Library Needed:

LIBRARY  animation.lib //CICLAnimationDataProvider, CBasicAnimation

Source:

iGifFileDataprovider = new (ELeave) CICLAnimationDataProvider;
iGifFileDataprovider->SetFileL(iFsSession,_L("C:\\nokia\\images\\anim.gif"));
 
igifanimationconfig.iFlags = TAnimationConfig::ELoop;
igifanimationconfig.iData = 10000;
TPoint gifpoint = Position();
iGifAnimatior = CBasicAnimation::NewL(iGifFileDataprovider,gifpoint,CEikonEnv::Static()
->WsSession(),Window());
iGifAnimatior->Start(igifanimationconfig);
 
//In your Draw method
iGifAnimatior->Draw(gc);


Additional way showing GIF animation with image decoder API: Showing_GIF_animations

NOTE: basicanimattion.h is not available in 3rd edition MR release. ref: MR documentation

GIF frame rate consideration

As of S60 3rd edition FP2 the APIs mentioned above won't play well GIFs with 20 frames per second. It will just play too slow because that framework can't deliver 20FPS apparently. I've been using GIFs with only 6.66FPS and they render quite nicely on the phone. It might be worth testing 10 or 15FPS too see if they play properly. You may find that different devices deliver different performance.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fHowE5ftoE5fmakeE5fanE5fanimationE5floopX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZanimationQ qfnZtopicQUqfnTopicZgraphicsQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ