Managing animated images in PHP

跟風遠走 提交于 2019-12-25 04:55:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!