Managing animated images in PHP
I would like to have some information about this top开发者_StackOverflow社区ic. Everybody knows that it's possible to manage and even create images with PHPs gd-library, but is it possible to edit animated GIFs without losing the animation? Hope that someone is wise enough to answer this :)
Martti Laine
It is said on the website of Boutell, the original makers of GD that there are animation functions to GD, but I have never seen them mentioned anywhere in the PHP manual.
There are several external classes to edit animated GIFs like this one.
If your server supports it, however, I recommend ImageMagick, an external image processing solution. It can split animated GIFs into single files (see here) and put them back together to an animation.
Additional GD resources:
- How do I extract a single image from a multi-image file?
- Animation basics in the GD manual
- Animation modifications in the GD manual
精彩评论