|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59942 Positioning error in compositeimage
Submitted: 2011-09-08 09:23 UTC Modified: 2011-11-16 17:49 UTC
From: www dot query at gmail dot com Assigned: vito (profile)
Status: Closed Package: gmagick (PECL)
PHP Version: 5.1.6 OS: Centos (Red Hat) 5.6
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:
Solve the problem:
29 - 21 = ?
Subscribe to this entry?

 [2011-09-08 09:23 UTC] www dot query at gmail dot com

When placing smaller image on top of larger image, the 'x' parameter does not work. Whatever the value the result is x= 0.  X is the width.

X = 0, y = 0 is the top left corner. Trying to position in the bottom right corner results in the image appearing in the bottom left corner regardless of the value of 'x' being the 3rd parameter in


The larger image is 800 wide, 450 high, JPG. The smaller image is 222 wide by 98 high and is a PNG with a transparent background.

Using the same instruction,


ImageMagick positions correctly in bottom right corner.
Please supply any information that may be helpful in fixing the bug:

    * The version number of the PECL package or files you are using.


Reproduce code:
PIC1 = 3840 wide x 2160 high.

$picin = new Gmagick($pic1);
$height = $picin->getimageheight();

$pj = new gmagick($dir2.'pj5.png');

# 222 x 98 / 800 x 450

$pic6  = $dir2.$ref.'-000.jpg';

Expected result:
The smaller image positioned in the bottom right corner of the larger image.

Actual result:
The smaller image is position in the bottom left corner.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-08 09:29 UTC] www dot query at gmail dot com
From phpinfo()

gmagick version 	1.0.1-b1
 [2011-11-16 17:49 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


    Please try with version 1.0.10b1.

    I'd tried to reproduce with the code specified in the Description and was 
able to generate the right image.

    The Gmagick source seems to act on the x axis properly as well.

    Thanks! Email me if you need my source code and image output.

 [2011-11-16 17:49 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: vito
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 16:01:28 2024 UTC