Resize by exactly ratio

See all posts Reply

Resize by exactly ratio new!
by Andrei, 12 years, 9 months ago
I searched in forum, docs and examples, but i didn't found how to resize an image using a new ratio.

Examples:
4:3 (1.33) ratio
from 800 x 725 to 800 x 600
from 800 x 900 to 800 x 600

4:4 ratio

from 800 x 900 to 800 x 800
from 800 x 725 to 725 x 725

ThxReply
Re: Resize by exactly ratio new!
by colin, 12 years, 9 months ago
You can use image_ratio_crop for your first example. For the second one, you will need to set the sizes dynamically, reading image_src_x and image_src_y before calling process()Reply
Re: Resize by exactly ratio new!
by Andrei, 12 years, 9 months ago
Thanks for your response

I'll make a function for class to do that. I'll post here when it will be ready!Reply