How to crop automatically keeping ration and fit in specific x and y

See all posts See thread Reply

Re: How to crop automatically keeping ration and fit in specific x and y new!
by seanie, 17 years, 6 months ago
can you give some example code please.
ThanksReply
Re: How to crop automatically keeping ration and fit in specific x and y new!
by colin, 17 years, 6 months ago
Yes, sure.

$foo->image_x = 100;
$foo->image_y = 150;
$foo->image_ratio_crop = true;
$foo->image_convert = 'jpg';
$foo->resize = true;

The image will be resized so that it fills 100x150, and the excedent will be cropped. So all your thumbnails have the same dimensions, even if the full size images have different ratios.Reply