问题
I would like to have some information about this topic. 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
回答1:
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
来源:https://stackoverflow.com/questions/1994969/managing-animated-images-in-php