Home » Images » Image_Transform » Bug #3309
fit() method, wrong algorithm
Details
| Submitted | 2005-01-27 11:03 UTC |
|---|---|
| From | stephan at wentz dot it |
| Status | Bogus |
| Package | Image_Transform |
| PHP Version | 4.3.10 |
| OS | Linux |
| 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