PDA

View Full Version : Getting past the 256-color GIF limit?



Rubius-sama
Jun 24, 2007, 06:50 PM
I've seen a lot of animated GIFs on the web using truecolor palettes (16/24/32 bit). I can't seem to figure out the secret behind this. Does anyone here know?

I found this on wikipedia but it didn't help.

[quote]Although the standard GIF format is limited to 256 colors, there is a hack that can overcome this limitation under certain circumstances.

GIF89a was designed based on the principle of rendering images (known as frames when used for animation) to a logical screen. Each image could optionally have its own palette, and the format provides flags to specify delay and waiting for user input between them (the latter is not widely supported by viewers). This is the feature that is used to create animated GIFs, but it can also be used to losslessly store a 24-bit RGB (truecolor) image by splitting it up into pieces small enough to be encoded into a 256 color palette and setting up the GIF to render these with no delay on the logical screen.[6] However, most web browsers seem to assume that this multi-image feature will only be used for animation and insert a minimum delay between images. There will also be some file size bloat from doing this, especially if the encoder doesn't support LZW for patent reasons. There are very few tools around that can easily produce 24-bit GIFs, and it is rarely an appropriate format unless there is absolutely no other option.

http://en.wikipedia.org/wiki/Gif</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>

DurakkenX
Jun 24, 2007, 08:31 PM
according to that article what you want to do is on the high end side...this means more than likely noone here knows how and more than likely you can't afford the software or hardware to produce that image and even if you can it is unlikely you can get your hands on it anyways legitimately

VioletSkye
Jun 24, 2007, 08:44 PM
Vector based Flash animations are relatively small and not limited to 256-color palettes. You also have the added bonus of interactivity.

HUnewearl_Meira
Jun 24, 2007, 11:33 PM
I'm with VioletSkye on this one. If you need a wider range than 8-bit color, than almost anything else is a better choice than GIF. The GIF format was devised for low-color applications, rather than high-color. The reason is that LZW can be an incredible algorithm for compressing low-color images, but when high-color images get involved, it absolutely loses its advantages. There have been no standardized high-color animated image formats developed because the vast majority of uses that a high-color animation would have, tend to be handled nicely by video formats.

Also, as that wikipedia article points out, high-color GIF hacks may not be supported by most browsers. To meet that purpose, you're probably better off using QuickTime format, or as VioletSkye pointed out, a vector-based Flash animation. Or YouTube.

Otherwise, you can tinker around with your gif's palette settings (Web palette is probably a bad idea, though Closest Match might do you well). Try different dither patterns, and just see what works out best. If you can't find an acceptable combination of settings, that's when you start considering Flash and video formats.

Rubius-sama
Jun 25, 2007, 08:27 AM
If I were to use another format, what formats other than GIF support image transparencies?