我在使用 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);