Reply to Re: Resize - max only

Re: Resize - max only new!
by colin, 17 years, 7 months ago
Thanks Seanie, your code is correct, however there is a better way to do it: the class provides a parameter called image_ratio_no_zoom_in

From the doc:
image_ratio_no_zoom_in same as image_ratio, but won't resize if the source image is smaller than image_x x image_y (default: false)

So Tim, if you want to resize images that are bigger than 500px, but keep it as is if it is smaller, use the following code:
$handle->image_resize = true;
$handle->image_ratio_no_zoom_in	= true;
$handle->image_x = 500;
$handle->image_y = 500;
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important