|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66306 cropImage method return image size error
Submitted: 2013-12-17 10:01 UTC Modified: 2013-12-27 09:31 UTC
From: feiker dot hong at gmail dot com Assigned:
Status: Not a bug Package: gmagick (PECL)
PHP Version: master-Git-2013-12-17 (Git) OS: CentOS 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: feiker dot hong at gmail dot com
New email:
PHP Version: OS:


 [2013-12-17 10:01 UTC] feiker dot hong at gmail dot com
Version: 1.0.10b1

$this->_handle = new Gmagick($filename);
$this->_handle->cropImage($width, $height, $x, $y);

Test script:
$this->_handle = new Gmagick($filename);
$this->_handle->cropImage(1175, 325, 371, 392);

Expected result:
return image size:
width: 1549  (is not 1175 ?)
height: 325

Actual result:
return image size:
width: 1175
height: 325


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-27 09:31 UTC]
-Status: Open +Status: Not a bug
 [2013-12-27 09:31 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at


The right behaviour, I assume is for the library to crop at 1175 x 325 if a width of 1175 and height of 325 is specified.

I'd tried to crop with the test script below and am able to obtain what I think is the right result, i.e. if a width of 1175 is specified, it will crop with width of 1175.

Hence, gmagick and GraphicsMagick is already producing the right behaviour.

Tried with Gmagick 1.1.6RC2 and GraphicsMagick 1.4 snapshot-20131218.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Apr 12 23:01:26 2021 UTC