I got Ernie's IPicture COM working nicely.. but I began to wonder if IPicture has any animation abilities.. (so i looked it up on the MSDN and no such luck..).

So I thought i would toss out a general inquery to see if anyone else had thought about how to animate a Gif.. I could use IPicture and "regulate" separeate images, but this requires me splitting up a gif into separate image files.

Any thoughts, Ideas?, or Avenues to persue?

As always, thanx in adavance...

NaN
Posted on 2001-09-06 02:31:09 by NaN
Actually, a GIF file is a series of little image files, so it's already divided up that way.

GIF format is a Compuserve defined format back from 87 and 89. I believe the spec name is GIF89A.txt (web surf it, perhaps on http://www.wotsit.org/).

The spec is actually quite flexable, it allows a small portion of the image to be updated instead of a series of full frame updates (bandwidth was quite expensive in 87), and also allows ASCII text inside the file to be drawn. It lets the time between each frame update be specfied, if the whole thing loops or just displays a certain number of times, and some other stuff I forgot.

The worst drawback is the compesion method is panteted, and the owner (I forget who offhand) enforced the patent, even on shareware (meaning you have to pay a fee to give away a program using it).
Posted on 2001-09-06 06:48:52 by Ernie
Might want to look at the browser control that Xtreme has posted. Well, atleast that's the way the VBers display an animated GIF. :)
Posted on 2001-09-06 08:58:21 by bitRAKE
I have written a single-image GIF decoder, bins and complete source is available at my site... Maybe it can help, it can process the blocks a GIF file consists of, but I can't remember all the details... It now just looks for the first image it can find.

Thomas
Posted on 2001-09-06 14:21:14 by Thomas
Thats right.. i forgot about that package you made... I will have to look into it as well... Im sure it cant be too hard to animate a gif. My idea is it would make a sweet HTML object, complete with animated links. (much like a web link) except this is painted on your window.. and not in a browser...

As it stands now.. i can easily inherit CPicture to make err.. "CHTMLPic" which will goto a web link in the default browser when clicked.. (instead of following the mouse around as the example does (JPricture class) )

The other bonus to all this hype is, if i alot of DIFFERENT classes inherit from CPicture.. only one copy of CPicture resides in memory, while uniquely different classes only provide the EXTRA code that makes them unique... So its good to made a good robust base class.. (much like the code Ernie provided in the first place).

NaN
Posted on 2001-09-06 17:08:48 by NaN
Umm, that ain't my code there. I just showed how to get a handle on MS's picture object.
Posted on 2001-09-06 17:28:41 by Ernie