Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create an animated .gif from .jpeg/png

Tags:

php

gd

Is it possible to use the GD library to create an animated gif? I want the user to upload a png/jpeg and generate a 2 frame animated gif out of the image. Thanks

like image 677
Johan Avatar asked Apr 21 '12 15:04

Johan


Video Answer


2 Answers

The question is old but here a new library to create animated GIF with PHP: https://github.com/Sybio/GifCreator

like image 125
Sybio Avatar answered Sep 27 '22 02:09

Sybio


There is a good post about it on SO : Create Animated Gif with Jpeg Images

You can't do it with GD Functions, but there is a class on phpclasses.org to do this, check that : PHP Classes GIF Animation From

You can also find a good tutorial about it here : Tutorial Generate Animated GIF PHP

like image 24
ChapMic Avatar answered Sep 24 '22 02:09

ChapMic