【问题标题】:PHP imagecreatefromgif is not creating animated gif from pathPHP imagecreatefromgif 不是从路径创建动画 gif
【发布时间】:2018-08-16 21:29:45
【问题描述】:

我正在尝试从路径获取动画 gif 图像。但是我得到的不是动画的 gif

$im = imagecreatefromgif($path);
$newFilePath = app()->basePath("public/memes/") . $newname .'.gif';
header('Content-Type: image/gif');
imagegif($im, $newFilePath);
imagedestroy( $im );
return $newFilePath;

【问题讨论】:

标签: php gd gif


【解决方案1】:

manual - "将动画 GIF 文件读入内存时,图像资源指针中只返回第一帧。"

看看http://phpimageworkshop.com/tutorial/5/manage-animated-gif-with-imageworkshop.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多