4.6.6 bug fixes

This commit is contained in:
JT Smith 2002-09-04 02:43:46 +00:00
parent e305e8ca07
commit a1a21aa1ee
8 changed files with 2173 additions and 1091 deletions

View file

@ -74,8 +74,10 @@ sub _createThumbnail {
WebGUI::ErrorHandler::warn("Couldn't read image for thumnail creation: ".$error) if $error;
($x, $y) = $image->Get('width','height');
$n = $_[1] || $session{setting}{thumbnailSize};
$r = $x>$y ? $x / $n : $y / $n;
$image->Scale(width=>($x/$r),height=>($y/$r));
if ($x > $n || $y > $n) {
$r = $x>$y ? $x / $n : $y / $n;
$image->Scale(width=>($x/$r),height=>($y/$r));
}
if (isIn($_[0]->getType, qw(tif tiff bmp))) {
$error = $image->Write($_[0]->{_node}->getPath.'/thumb-'.$_[0]->getFilename.'.png');
} else {