Reputation: 301
I am trying to get animated gif image from path. However I am getting gif that is not animated
$im = imagecreatefromgif($path);
$newFilePath = app()->basePath("public/memes/") . $newname .'.gif';
header('Content-Type: image/gif');
imagegif($im, $newFilePath);
imagedestroy( $im );
return $newFilePath;
Upvotes: 0
Views: 881
Reputation: 249
manual - "When reading animated GIF files into memory, only the first frame is returned in the image resource pointer."
Take a look at http://phpimageworkshop.com/tutorial/5/manage-animated-gif-with-imageworkshop.html
Upvotes: 5