×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    64

    show gif with animation

    hello,

    I want to show GIF file on my CCoeControl. anyone please send me source code for that thing, i m new in symbian development.

    i had copied code available in nokia forum but it is not working...

    u can mail me also on hi_hellonaresh@yahoo.co.in

    thanks in advance

    regards,
    Naresh
    Last edited by naresh99; 2006-12-06 at 09:59.

  2. #2
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: show gif with animation

    Hi,

    Try with CPAlbImageViewerBasic and MPAlbAnimationObserver classes. It will pay animated GIF.

    Regards,
    Sudhakar

  3. #3
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    64

    Re: show gif with animation

    hi,

    thanks for reply,

    i had tried the code, but it not displaying anything.


    CPAlbImageViewerBasic* iViewer = CPAlbImageViewerBasic::NewL(this, Rect());
    iViewer->SetImageNameAndDisplaymodeL(_L("C:\\Images\\birthday.gif"), EColor4K);
    iViewer->LoadImageL();

    please guide me what to do ? i m begineer to symbian,so.......

    regards,
    Naresh

  4. #4
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: show gif with animation

    Hi,

    Post your code snippet of header file and cpp file .

    Basically u need to implement MPAlbAnimationObserver interface by deriving your view class from it .
    //in header file
    class CYourAppView : public CCoeControl,public MPAlbAnimationObserver
    {
    CPAlbImageViewerBasic* iViewer; //For Animated GIF
    void Notify(TAnimationEvent aEvent);
    }
    //in cpp file
    void CYourAppView :: Notify(TAnimationEvent aEvent)
    {
    return;
    }
    CYourAppView ::ConstructL(const TRect& aRect)
    {
    .......
    iViewer = CPAlbImageViewerBasic::NewL(this,Rect());
    iViewer->SetAnimationObserver(this,ETrue);//Put EFalse if u want to play gif only once
    iViewer->SetContainerWindowL(*this);
    TFileName GifName;
    GifName.Copy(_L("C:\\Images\\birthday.gif"));,
    TInt KError = iViewer->LoadImageL(GifName,EColor4K);
    ActivateL();
    }
    CYourAppView ::Draw(const TRect& /*aRect*/) const
    {
    iViewer->PlayAnimationL();
    }

    to stop animation
    use
    //iViewer->StopAnimation();
    BR,
    Sudhakar

  5. #5
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: show gif with animation

    hi,

    you need to implement

    TInt CYourAppView :: CountComponentControls() const

    and

    CCoeControl* CYourAppView :: ComponentControl(TInt aIndex) const

    also.

    Check SDK documentation for these.

    BR,
    Sudhakar

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    3

    Re: show gif with animation

    Anyone know how to show animated gif in 3rd. ed. sdk?

  7. #7
    Registered User
    Join Date
    Nov 2006
    Location
    Bangalore
    Posts
    17

    Re: show gif with animation

    Hi Doze,

    i know how to render GIF animation in S60 3rd Ed...... :-)
    Send a mail to me for the code.


    Cheers
    Peru

  8. #8
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: show gif with animation

    Hi comp freak,

    What is your mail ID.

    Sudhakar
    Regards,
    Sudhakar

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: show gif with animation

    Hi Sudhakar,

    Can you please send the code to me as well..my id is kediamayank@gmail.com

    Actually I am trying to display all kinds of images..gif, jpg, bmp on my CEikImage control or for that matter any other control(excuse my naivity) on Series60...as UIQ has a control(image capture control) which displays all sorts of images..and it resizes bigger images to fit into the control window...something which i am not able to do with series60..can u please share the code or way to get this kind of thing done in Series60?

    Cheers
    mayank

  10. #10
    Regular Contributor
    Join Date
    Feb 2007
    Posts
    52

    Re: show gif with animation

    Quote Originally Posted by S.S.Sudhakar
    Hi,

    Post your code snippet of header file and cpp file .

    Basically u need to implement MPAlbAnimationObserver interface by deriving your view class from it .
    //in header file
    class CYourAppView : public CCoeControl,public MPAlbAnimationObserver
    {
    CPAlbImageViewerBasic* iViewer; //For Animated GIF
    void Notify(TAnimationEvent aEvent);
    }
    //in cpp file
    void CYourAppView :: Notify(TAnimationEvent aEvent)
    {
    return;
    }
    CYourAppView ::ConstructL(const TRect& aRect)
    {
    .......
    iViewer = CPAlbImageViewerBasic::NewL(this,Rect());
    iViewer->SetAnimationObserver(this,ETrue);//Put EFalse if u want to play gif only once
    iViewer->SetContainerWindowL(*this);
    TFileName GifName;
    GifName.Copy(_L("C:\\Images\\birthday.gif"));,
    TInt KError = iViewer->LoadImageL(GifName,EColor4K);
    ActivateL();
    }
    CYourAppView ::Draw(const TRect& /*aRect*/) const
    {
    iViewer->PlayAnimationL();
    }

    to stop animation
    use
    //iViewer->StopAnimation();
    BR,
    Sudhakar

    hi Sudhakar

    i try to implement the code u give also i implement the count control & component control.
    but ehen i try to start the propgram i crashes.

  11. #11
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: show gif with animation

    At which point it is crashing. What is the error code and which device u r using. Plz paste both header and cpp file. these details will help in resolving the issue.

    - Sudhakar

  12. #12
    Regular Contributor
    Join Date
    Feb 2007
    Posts
    52

    Re: show gif with animation

    Quote Originally Posted by S.S.Sudhakar
    At which point it is crashing. What is the error code and which device u r using. Plz paste both header and cpp file. these details will help in resolving the issue.

    - Sudhakar
    thanks Sudhakar actually it is not giving me any error the code of my .cpp file is
    iViewer = CPAlbImageViewerBasic::NewL(this,Rect());
    iViewer->SetAnimationObserver(this,ETrue);
    iViewer->SetContainerWindowL(*this);
    TFileName GifName;
    GifName.Copy(_L("C:\\sun.gif"));
    iViewer->LoadImageL(GifName,EColor4K);

    & rest as we specify in the different functions. same. i also put the image in the c:\ drive of symbian's wins folder.

  13. #13
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: show gif with animation

    Is it working in phone? I never tested the same in emulator.

    BR,
    Sudhakar

  14. #14
    Regular Contributor
    Join Date
    Feb 2007
    Posts
    52

    Re: show gif with animation

    no it is not working on phone too, behave as same as in emulator.
    Last edited by Gill; 2007-03-16 at 08:03.

  15. #15
    Registered User
    Join Date
    Jun 2007
    Posts
    27

    Re: show gif with animation

    hi sudhakar,
    i want to execute gif file in my application on 3rd edition.For this i have written following code

    RFs iFsSession;
    iGifFileDataprovider= new (ELeave) CICLAnimationDataProvider;
    iGifFileDataprovider->SetFileL(iFsSession,_L("C:\\ws_gif.gif"));

    igifanimationconfig.iFlags = TAnimationConfig::ELoop;
    igifanimationconfig.iData = 10000;
    TPoint gifpoint = Position();
    iGifAnimatior = CBasicAnimation::NewL(iGifFileDataprovider,gifpoint,CEikonEnv::Static()->WsSession(),Window());
    iGifAnimatior->Start(igifanimationconfig);

    and also included following header files
    #include <BasicAnimation.h>
    #include <AnimationConfig.h>
    and the library file animation.lib
    But the problem is when i included animation.lib in mmp file
    the application crashes codewarrior completely.so in this case where i wrong .please give me some idea.
    Thanks and reagards
    mitu

Similar Threads

  1. Animation speed for a GIF file!
    By Den192 in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2009-01-14, 11:26
  2. gif animation problem
    By bojkar in forum Symbian
    Replies: 5
    Last Post: 2007-03-16, 09:04
  3. GIF Animation Background
    By kamalsinghania in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-11-17, 06:56
  4. Gif animation loop flag
    By jusav in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-06-27, 16:15
  5. Animated GIF for MMS Specifications
    By handtap in forum General Messaging
    Replies: 2
    Last Post: 2003-08-22, 09:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×