I'd like to display an animated GIF with the least head ache :) No I don't want to convert it to a MPEG :)
Posted on 2001-02-03 02:25:00 by bitRAKE
I have created a library for displaying GIF's, but it doesn't support animated GIF. The lib and full asm sourcecode are available at my site. Maybe you can use the source code to decode animated GIFs (they are just sequences of normal GIFs with control blocks between them). Thomas This message was edited by Thomas, on 2/3/2001 4:30:32 AM
Posted on 2001-02-03 04:30:00 by Thomas
I'm going to assume "code a full GIF decoder" lies outside "with the least headache," and you have a small defined set to display. Get a GIF editor and pull out the individual frames and convert to bitmaps. Using a timer and your favorite picture method (from changing the bitmap in a static control to bliting thru a double buffer) change the image just like any movie image changes. Some gifs contain frames with only a partial pic (the rect that is changing). Your choice is a more complicated paint method, or converting frames to full size.
Posted on 2001-02-03 06:33:00 by Ernie
Thanks, Thomas. I wrote my first GIF decoder in 68000 :) It was just GIF87. I'll go take a look at your code. I need the files to remain GIFs. Could you point me at the best docs. I'd like to remain compatible with the browers that are popular as well *ouch* How would you say the error checking in the code is? There are so many broken picks around :) Ernie, I've heard of using a IE component to display a animated GIF in VB, but I've never done it...maybe this should be in the other forum? This is beyond me at the moment from ASM :) Take care, bitRAKE.
Posted on 2001-02-03 23:24:00 by bitRAKE
bitRAKE: I've designed my lib to use GIFs inside your own program, as a replacement of the space consuming bitmaps, not as a basis for a GIF viewer or something so I haven't implemented all formats. It handles GIF89 and GIF97, 1 to 8 bit color, but not interlaced GIFs or GIFs with multiple layers/images etc. So you'll have to do this yourself if needed. I got all the docs from wotsit but this site seems to be down right now. Do a search on GIF and you will find about 4 docs on the GIF format. Another good doc is 'LZW and GIF explained'(iirc). If you can't find them let me know, I will send you them. Thomas
Posted on 2001-02-04 06:08:00 by Thomas
I have a Q? IS it not that GIF is a patented format....and anybody that wants to use it MUST (lately) pay a 5.000 USD fee to UNISYS ? is it legal to use GIF LZW encoding anymore?
Posted on 2001-02-04 07:50:00 by BogdanOntanu
bitRAKE: Code the full GIF decoder first. Once you're past the LZW decoder it's all downhill and MUCH more easier then using an ocx in an asm app. I believe Unisys is still claiming the patent on LZW, I don't know their fee, it's payable by the developer. You can just ignore this, but first ask yourself: Do you feel lucky, punk? Back there in all that excitement I forget if I filed 6 lawsuits or 7. So, do you feel lucky?
Posted on 2001-02-04 10:25:00 by Ernie
I know exactly why the little tool I'm thinking on making doesn't exist :) - and I don't feel lucky, so no one but me will see it :( So you are telling me that all these GIF editors and viewers payed a fee, and that all the pictures all over the web can't be used without a pat on UNISYS's back! That sucks :( Is the another animated raster format used on the web that is FREE??? Thanks, bitRAKE.
Posted on 2001-02-04 22:12:00 by bitRAKE
Actually, in the US, the law states you can decode any compression format without the acquisition of a license. However, in order to use the format for compression use, you must pay the upteen-thousand dollar fee-er, I mean PRICE for the license. :)
Posted on 2001-02-05 01:08:00 by Racso
It's okay to view GIF images. Just can't encode them. In fact, you can create GIF files legally, it's only if you use the LZW algorithm that you have to pay fees. Now most people think that Unisys is the patent holder. It's actually both IBM and Unisys, although it's Unisys that protects the work, mostly. Welcome to the world of US Intellectual Property. A hot topic that most of you don't want me to get started on. It's too easy to abuse the laws that are meant to protect you. What was meant to protect the little guy also makes it difficult for the little guy to protect himself (expensive). That is why we freeware or opensource writers must pay to license. At least in this case, we can make a decoder without a hassle, just not an encoder (useing the LZW algorithm). We can make GIF without LZW, but it wouldn't have the advantage of small size. What's worse, is the person who patented the algorithm isn't the one who discovered (not invented) the algorithm. It was published in a trade magazine and the whole community loved the extremely efficient algorithm. It appears that one of those "obsessed fans" went to took out a patent (er, two of them -- IBM and Unisys). They were both awared the patent. *Sigh*. There is a bright side. in about 2 years, the patent expires (they last 17 years -- but they can be renewed or improved upon, creating a new patent, which extends the lifetime of them). To conclude, it's the GIF89a that is GIF animations, not GIF89, or 87, or whatever, at least, it started with GIF89a. Thanks, _Shawn
Posted on 2001-02-06 10:57:00 by _Shawn
If I use LZW, I'm sure to implement the IBM version :)
Posted on 2001-02-06 16:10:00 by bitRAKE
bitRAKE - Go ahead and use whichever compression is more convenient for the purposes of your program... All your program does is DISPLAY the gif, therefore it's allowable (and even distributable) with the patent-holder have NO say... The fee only applies if your app is going to ENCODE, not DECODE... This is why some (only a few, really) graphics programs will read and open GIFs, but not save them. This is based on U.S. law, so things may be different elsewhere. This message was edited by Q, on 2/7/2001 9:50:30 AM
Posted on 2001-02-07 09:19:00 by Q