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:
19 + 14 = ?
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

php (last revision 2020-11-16 08:43 UTC by 920768504 at qq dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-16 08:43 UTC] 920768504 at qq dot com
The following patch has been added/updated:

Patch Name: php
Revision:   1605516183
URL:        https://bugs.php.net/patch-display.php?bug=64623&patch=php&revision=1605516183
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC