php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75408 ::getImage() loses image sequence (gifs)
Submitted: 2017-10-19 16:21 UTC Modified: 2017-10-19 22:17 UTC
From: katherineave at gmail dot com Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 7.0.24 OS: Linux Mint 18.2
Private report: No CVE-ID: None
 [2017-10-19 16:21 UTC] katherineave at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/imagick.getimage
---
Returns a new Imagick object with the current image sequence.

Test script:
---------------
$magick = new Imagick('animated.gif');
echo sizeof($magick);              // e.g. 33 frames
echo sizeof($magick->getImage());  // 1! 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-19 22:17 UTC] kalle@php.net
-Status: Open +Status: Not a bug
 [2017-10-19 22:17 UTC] kalle@php.net
I believe this is because if you load an animated image, then it will contain all the frames as sequences, using getImage() will return the current sequence, meaning you need to iterate with hasNextImage() + nextImage() to get the additional frames
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC