I wants to resize animated GIF images without loosing animation. Resize process is working fine but after resize animation goes away. Please check my script in-line if i am doing anything wrong
Version: 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);
See this answer . From the link:
If you have imagemagick access, you can do this:
system("convert big.gif -coalesce coalesce.gif"); system("convert -size 200x100 coalesce.gif -resize 200x10 small.gif");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.