php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59057 Problem with resizing animated GIFs
Submitted: 2010-02-01 15:25 UTC Modified: 2010-02-02 04:56 UTC
From: spinn909 at gmail dot com Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5_3.1RC2 OS: Debian 5.0.3 x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spinn909 at gmail dot com
New email:
PHP Version: OS:

 

 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-02 04:56 UTC] spinn909 at gmail dot com
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);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC