Image Resize option future

See all posts See thread Reply

Re: Image Resize option future new!
by colin, 16 years, 12 months ago
You will have to use the version 0.25 RC1.

First, you should not have more than one image_ratio_xxxx used together. So your code:
$handle->image_ratio_x = TRUE;
$handle->image_ratio_y = TRUE;
should be:
$handle->image_ratio = TRUE;

To do what you describe, you have two possibilities:

1. Resize only if the picture is larger than the specified sizes, using image_ratio_no_zoom_in
$handle->image_resize = TRUE;
$handle->image_ratio_no_zoom_in = TRUE;
$handle->image_y = 300;
$handle->image_x = 400;

2. Otherwise, you can set un maximum number of pixels, using image_ratio_pixels. So the image will be resized to approximate this maximum number of pixels.
$handle->image_resize = TRUE;
$handle->image_ratio_pixels = 120000; //300x400
Reply