GIF resizing only save the last frame

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
albertotm1986
Posts: 1
Joined: 2016-02-01T05:22:53-07:00
Authentication code: 1151

GIF resizing only save the last frame

Post by albertotm1986 »

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.

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);
Any help will be apreciated.

Thanks
Post Reply