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

Leeteq’s picture

Subscribing.

drewish’s picture

Status: Active » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.