Results 1 to 6 of 6

Thread: [RESOLVED] Load and show animated gif

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2021
    Posts
    252

    Resolved [RESOLVED] Load and show animated gif

    I had this really cool class to load every frame of an animated gif.
    Then using a timer, I could show the frames.
    This class has been relying on OleLoadPictureEx to load each frame constructed on memory.
    Well, it doesn't work anymore, throwing error 0x8000FFFF - "Catastrophic failure".
    M$ must have done something to "improve" this function and the results are really showing up.
    So, I've tried using WIA instead - no luck there either.
    So, I guess I am looking for a new solution for loading each frame of an animated gif.

  2. #2
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,019

    Lightbulb Re: Load and show animated gif

    Pretty sure those OleLoadPicture family of functions can load only bitmaps. I thought GIFs were a different format (compressed)... Maybe you could share the class here though?

  3. #3
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    811

    Re: Load and show animated gif

    See this thread for alternatives:

    https://www.vbforums.com/showthread....ted-gif-frames

    You may want to post code that duplicates the problem if you still want to use the same method.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2021
    Posts
    252

    Re: Load and show animated gif

    Quote Originally Posted by qvb6 View Post
    See this thread for alternatives:

    https://www.vbforums.com/showthread....ted-gif-frames

    You may want to post code that duplicates the problem if you still want to use the same method.
    Well, this is just fantastic!

    I've replaced my code for loading frame with WIA code in this link, and kept my old code to extract frames' duration, and now everything work fine!

    And I thought I'm in for a long torture...

    Thanks!

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2021
    Posts
    252

    Re: [RESOLVED] Load and show animated gif

    I thought I will share this class here for anyone interested.
    It can rotate, flip, resize, change animation rate.
    Instructions included in code.
    Attached Files Attached Files
    Last edited by Dry Bone; Sep 14th, 2024 at 08:03 PM.

  6. #6
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,269

    Re: [RESOLVED] Load and show animated gif

    You can display/flip/rotate with just a few lines using IShellImageData too:

    http://www.vbforums.com/showthread.p...ore-No-GDI-DLL

    I made a UserControl that simplifies it even more; it's meant primarily for tB and VBA, but you could copy the code and use oleexp.tlb instead of the in-project defs in VB6 or compile a 32bit OCX:

    https://github.com/fafalone/ucAniGif

Posting Permissions

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



Click Here to Expand Forum to Full Width