|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-02-01 15:25 UTC] spinn909 at gmail dot com
Description:
------------
I get strange results when trying to resize animated GIFs. Using latest ImageMagick, tried with both beta and stable versions of the PHP extension.
Reproduce code:
---------------
$im = new Imagick('animated.gif'); // 512x448px
$im->coalesceImages(); // tried both with and without this
$im->resizeImage(50, 50, Imagick::FILTER_MITCHELL, 0.5);
$im->writeImage('resized.gif');
Expected result:
----------------
The animated image, resized to 50x50px.
Actual result:
--------------
94x467px image, without animation. No errors reported.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 17:00:01 2025 UTC |
Thanks, this helped although I still didn't get the expected result. To get that I did the following: $im = new Imagick("example.gif"); $im2 = $im->coalesceImages(); foreach ($im2 as $frame) { $frame->thumbnailImage(50, 50); $frame->setImagePage(50, 50, 0, 0); } $im2->writeImages("example_small.gif", true);