if ($newWidth > $imageWidth) { $subWidth = ($newWidth - $imageWidth) / 2; $tb->creaThumb($newWidth, $imageHeight); $tb->setThumbAsOriginal(); $tb->cropThumb($imageWidth, $imageHeight, $subWidth, 0); } elseif ($newWidth == $imageWidth) { $tb->creaThumb($imageWidth, $imageHeight); } elseif ($newWidth < $imageWidth) { $subHeight = ($newHeight - $imageHeight) / 2; $tb->creaThumb($imageWidth, $newHeight); $tb->setThumbAsOriginal(); $tb->cropThumb($imageWidth, $imageHeight, 0, $subHeight); } } else { $orHeight = $tb->getHeight(); $orWidth = $tb->getWidth(); $tb->creaThumb($orWidth, $orHeight); } $tb->saveThumb($newtb, $params->get('quality')); $tb->closeImg(); } if ($params->get('use_tooltips')) { $image_url = '<img src="' . $newtb . '" alt="' . $row->title . '" border="0"' . '/>'; } else { $image_url = '<img src="' . $newtb . '" alt="' . $row->title . '" title="' . $row->title . '" border="0"' . '/>'; } } else { //Images - HTML Resize //Set up the width and height variables if ($imageWidth > 0) { $width = ' width="' . $imageWidth . 'px"';