Closed (fixed)
Project:
ImageAPI
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2008 at 13:53 UTC
Updated:
1 Apr 2009 at 10:20 UTC
The image scale function doesn't rescale the image to the correct dimensions if height > width.
Following fixed it for me:
if (empty($height)) {
if($image->info['width'] > $image->info['height']) {
$height = $width / $aspect;
} else {
$height = $width * $aspect;
}
}
The same should be done for calculating width.
Comments
Comment #1
Leeteq commentedSubscribing.
Comment #2
drewish commentedI committed #396924: Backport fixes from D7 core which should help this. Please test the new 5.x-1.x-dev release and re-open this issue if the problem is still occurring.