but am still curious as to why GD doesn't work for me.
Because you're using it wrong :).
First, you are accumulating the frames in $gifdata .= $frame->gifanimadd;, but then you print just the header info from the image into the file: print F $img->gif();.
You should be printing the accumulated headers and frame data to the file: print F $gifdata;
That doesn't affect a complete fix though because you're also confusing what constitutes a frame and what a complete animation. That is, you appear to be drawing a complete set of moving rectangles into each frame, rather than one rectangle at a different position in each frame.
You should also check that each frame, when viewed as a discrete image, actually displays what you think you are drawing in that frame..
And finally, you need to ensure that all the colors you use in the frames, are added to the palette of the base image, before you capture the header with gifanimbegin()
In reply to Re: Creating an animated gif with GD
by BrowserUk
in thread Creating an animated gif with GD
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |