[英]Animated GIF Image Resize with Imagick PHP
我想調整動畫GIF圖像的大小而不丟失動畫。 調整大小過程工作正常,但是調整大小后動畫消失了。 如果我做錯任何事情,請在線檢查我的腳本
版本:ImageMagick 6.9.1-1 PECL Imagick Extension-3.1.2
$images = $this->imageObj->coalesceImages();
foreach ($images as $frame) {
$frame->thumbnailImage($this->thumbWidth, $this->thumbHeight);
$frame->setImagePage($this->thumbWidth, $this->thumbHeight, 0, 0);
}
$this->imageObj = $images->deconstructImages();
$this->imageObj->writeImage($this->thumbImagePath);
看到這個答案 。 從鏈接:
如果您具有imagemagick訪問權限,則可以執行以下操作:
system("convert big.gif -coalesce coalesce.gif"); system("convert -size 200x100 coalesce.gif -resize 200x10 small.gif");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.