My server is running PHP 5.0.2 and GD2 with full gif support. I'm having troubles with animated gifs when I use imagecreatefromgif() and imagegif(), in that I'm only getting the first frame. I could live with this if I have to, but I'd like to get animation working if possible.

According to php.net, GD is supposed to be able to handle animated gifs, as long as it is GIF89a, as indicated in the comment by kremlin at home dot com (Feb 2001) on the imagegif() documentation. He further indicates that if you make the image transparent via imagecolortransparent(), it should force the gif to be GIF89a. By default, imagegif() makes the image GIF87a, which doesn't support transparency or animated gifs (source: imagegif() documentation).

I tried simply using imagecolortransparent($img) as well as allocating black or white to $img via imagecolorallocate() and then setting the allocated colors via imagecolortransparent($img, $make_transparent). But no dice.

Am I misunderstanding the information? Or does GD simply not handle animated gifs?

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to