GIF resizing only save the last frame
Posted: 2016-02-01T05:29:39-07:00
HI to all the imageMagick team. I'm trying to resize a gif and I know hot to do it, but when I save the images with the writeImges function it only saves the last frame. This is the code that I'm using.
Any help will be apreciated.
Thanks
Code: Select all
$imagickPostBlock = new Imagick($imagePath);
$imagickPostBlock = $imagickPostBlock->coalesceImages();
foreach($imagickPostBlock as $frame){
$frame->thumbnailImage($postblockWidth, $postblockHeight);
$frame->setImagePage($postblockWidth, $postblockHeight, 0, 0);
}
$imagickPostBlock->writeImages($postPath.'/postblock'.$filename,true);
Thanks