1

アップロード後、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
)
4

2 に答える 2

3

これを試してみてください: http://www.php.net/manual/en/imagick.coalesceimages.php
最初のコメントは必要なもののようです。また、GD2 ライブラリ ("imagecreatefromgif") と Imagick を混在させてはいけません。

于 2013-08-26T05:16:09.637 に答える