php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64623 addImage does not behave consistently
Submitted: 2013-04-10 15:13 UTC Modified: -
From: imprec at gmail dot com Assigned:
Status: Open Package: gmagick (PECL)
PHP Version: Irrelevant OS: Irrelevant
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
27 - 23 = ?
Subscribe to this entry?

 
 [2013-04-10 15:13 UTC] imprec at gmail dot com
Description:
------------
When using addImage, then behavior depends on the number of frames already in 
the gmagick instance :

When using the following code :

class layers
{
    private $gmagick;
    public function __construct(Gmagick $gmagick)
    {
        $this->gmagick = $gmagick;
    }

    function set($offset, $frame)
    {
        $this->gmagick->setimageindex($offset);
        // tricky workaround for https://bugs.php.net/bug.php?id=62309
        $this->gmagick->nextimage();
        $this->gmagick->addimage($frame);
    }
}

If the gmagick object contains only one frame at the beginning, the frame is 
inserted BEFORE the existing frame, otherwise it is inserted after


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 01:01:23 2019 UTC