PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Images » Image_Transform » Bug #3309

fit() method, wrong algorithm

Details

Submitted2005-01-27 11:03 UTC
Fromstephan at wentz dot it
StatusBogus
PackageImage_Transform
PHP Version4.3.10
OSLinux
Roadmaps(Not assigned)

Comments

[2005-01-27 11:03 UTC] stephan at wentz dot it

Description:
------------
fit() method in cvs checks wrong dimension:

if i want to fit to 100,100 and the image is 200x300 it checks if $this->img_y < 100, this is false and so calls $this->scaleByX(100), which will lead to an image with dimensions 100x150.

checks have to be done like $this->_x/$width > $this->y/$height ? x : y.

Reproduce code:
---------------
-

Expected result:
----------------
an image with size 67x100

Actual result:
--------------
an image with size 100x150