Page 1 of 1
Imagick takes long time to resize GIFs with lot of frames
Posted: 2018-02-04T10:09:52-07:00
by DiFdo
Im getting issues with some GIF images which has over 300 -400 frames when getting resized it takes longer time. Is there any way to optimizing this ?
Imagick PHP extension. pls advice
Re: Imagick takes long time to resize GIFs with lot of frames
Posted: 2018-02-04T10:19:00-07:00
by snibgo
Of optimizing what? How can we optimize your command if you don't tell us what it is?
Hint: "-resample" or "-scale" will be faster than "-resize". A specialist GIF processer such as gifsicle may be quicker than IM.
Re: Imagick takes long time to resize GIFs with lot of frames
Posted: 2018-02-04T11:07:04-07:00
by DiFdo
@snibgo
Im using PHP aPI , below is my current code
$imagick->coalesceImages();
foreach ($imagick as $frame) {
$frame->thumbnailImage($width, $height);
$frame->setImagePage($width, $height, 0, 0);
}
$imagick = $imagick->deconstructImages();
$imagick->writeImages($filePath, true);