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
Imagick takes long time to resize GIFs with lot of frames
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Imagick takes long time to resize GIFs with lot of frames
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.
Hint: "-resample" or "-scale" will be faster than "-resize". A specialist GIF processer such as gifsicle may be quicker than IM.
snibgo's IM pages: im.snibgo.com
Re: Imagick takes long time to resize GIFs with lot of frames
@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);
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);