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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: katherineave at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 10:01:33 2025 UTC