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
 [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

Pull Requests

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: Sat Dec 21 11:01:30 2024 UTC