0

PHP imagick を使用してすべてのフレームのサイズを変更するのに問題があります。公式のphpドキュメントの例から取っていますhttp://ir.php.net/manual/en/imagick.examples-1.php

/* Create a new imagick object and read in GIF */
$im = new Imagick("/tmp/bbb.gif");

/* Resize all frames */
foreach ($im as $frame) {
    /* 50x50 frames */
    $frame->thumbnailImage(50, 50);

    /* Set the virtual canvas to correct size */
    $frame->setImagePage(50, 50, 0, 0);
}

/* Notice writeImages instead of writeImage */
$im->writeImages("/tmp/zb.gif", true);
4

1 に答える 1

0

このページの例を試してください: http://www.php.net/manual/en/imagick.coalesceimages.php

gif の作成方法によっては、Coalesce が必要になる場合があります。また、バージョンの問題についてのコメントではありません。

于 2012-06-27T20:01:00.863 に答える