$thumbheigt was calculated instead of $thumbwidth

This commit is contained in:
urs_hunkler 2007-08-05 16:40:05 +00:00
parent ef9b262c7c
commit db8a7ac9d1

View file

@ -217,7 +217,7 @@ class data_field_picture extends data_field_file {
if ($thumbwidth && !$thumbheight) { if ($thumbwidth && !$thumbheight) {
$thumbheight = $image->height * $thumbwidth / $image->width; $thumbheight = $image->height * $thumbwidth / $image->width;
} else if($thumbheight && !$thumbwidth) { } else if($thumbheight && !$thumbwidth) {
$thumbheight = $image->width * $thumbheight / $image->height; $thumbwidth = $image->width * $thumbheight / $image->height;
} else { // BOTH are set - may need to crop if aspect ratio differs } else { // BOTH are set - may need to crop if aspect ratio differs
$hratio = $image->height / $thumbheight; $hratio = $image->height / $thumbheight;
$wratio = $image->width / $thumbwidth; $wratio = $image->width / $thumbwidth;