PHP - Create simple animated GIF from two JPEG images?

后端 未结 3 1277
梦如初夏
梦如初夏 2020-12-03 00:00

Does anyone know if it\'s possible to generate an animated GIF from two different JPEG files, displaying one image for x seconds then the other, and so on..?

Any adv

3条回答
  •  春和景丽
    2020-12-03 00:45

    It's not possible using the standard GD functions that come pre-packed with PHP.

    There is a class on phpclasses.org for this. I have never used it myself, but it's used by a lot of other packages.

    Alternatively, if you have access to ImageMagick from PHP, using either the MagickWand library or the command line, use it. With ImageMagick, it's no problem.

    • ImageMagick v6 Animation basics (from the IM manual)

    • Creating an Animated GIF image

提交回复
热议问题