php.net |  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
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:
20 - 6 = ?
Subscribe to this entry?

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

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



Test script:
---------------
Test:
$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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Hi,

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.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC