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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 27 = ?
Subscribe to this entry?

 
 [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: Sat Apr 27 23:01:30 2024 UTC