【问题标题】:php imagick gif resize all framephp imagick gif 调整所有帧的大小
【发布时间】:2012-06-28 15:10:36
【问题描述】:

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

【问题讨论】:

  • 生成一帧 gif。

标签: php resize gif imagick


【解决方案1】:

试试这个页面上的例子:http://www.php.net/manual/en/imagick.coalesceimages.php

根据 gif 的创建方式,您可能需要 Coalesce;也不是关于版本问题的评论。

【讨论】:

    猜你喜欢
    • 2015-06-16
    • 2014-05-23
    • 1970-01-01
    • 2015-04-19
    • 2013-06-11
    • 1970-01-01
    • 2018-06-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多