上传后,gif 会调整大小,但动画会丢失。我究竟做错了什么?
try
{
$animation = new Imagick($this->image_filename);
foreach ($animation as $frame)
{
$frame->thumbnailImage($width, $height);
$frame->setImagePage($width, $height, 0, 0);
}
$animation->writeImages($this->image_filename, true);
echo "<img src='".$this->image_filename."' />";
$this->image = imagecreatefromgif($this->image_filename);
}
catch(Exception $e){ echo $e->getMessage(); }
没有发现异常。
Array
(
[versionNumber] => 1608
[versionString] => ImageMagick 6.4.8 2011-03-20 Q16 OpenMP http://www.imagemagick.org
)