php imagick gif调整所有框架的大小 [英] php imagick gif resize all frame
本文介绍了php imagick gif调整所有框架的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题,无法使用php imagick调整所有框架的大小.它取自官方php文档示例 http://ir.php.net/manual/zh-CN/imagick.examples-1.php
i have a problem to resize all frame using php imagick. it's take from official php doc example 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);
推荐答案
在此页面上尝试示例: http://www.php.net/manual/zh/imagick.coalesceimages.php
Try the example on this page: http://www.php.net/manual/en/imagick.coalesceimages.php
取决于gif的创建方式,您可能需要合并.也不是关于版本问题的评论.
Depending on how the gif was created you may need the Coalesce; also not the coment about version problems.
这篇关于php imagick gif调整所有框架的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文