Skip to main content
GameDev.net gamedev.net
🔒 Locked

GIF transparency

Started by tokaplan Mar 25, 2006 at 9:10 AM 3 replies 600+ views
Original Post
tokaplan
tokaplan
Is there any way to add an alpha channel to gif animation? Does it support it at all? Thank you
S1CA
S1CA
1) AFAIK DirectX/D3D/D3DX doesn't support the GIF file format. If you want to use that format, you'll need to decode the animation frames yourself.

2) From memory, (like most 2D image formats of that era) I don't think GIF does support alpha channel(s) - it may support a colour key though.

3) Go to http://www.wotsit.org and search for GIF to get documentation, information and links regarding the all the nitty gritty details of the GIF89a format.
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
VisionForce
VisionForce
You can do a transparent image with DX though; you just have to set the background color as the transparent color through DX.
Alex C. BarberiChief Executive OfficerVisionForcehttp://www.visionforceweb.com
circlesoft
circlesoft
Quote:
Original post by VisionForce
You can do a transparent image with DX though; you just have to set the background color as the transparent color through DX.

Well you can also avoid color-keying (which is prone to artifacts) and do it through regular alpha channels in the image. Formats such as tga and png support this, I believe, as well as dds.
greenwire
greenwire
gif89a is the animated color keyed gif format.
http://www.danbbs.dk/~dino/whirlgif/gif89.html

but that's so 90's. use a png.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.