I need to resize image,according to the specific aspect ratio.
For example if I have image with this dimensions 1600*800 the ratio is 2:1,
let's say I need to resize the image so the ratio have to be like that 2:3.
Any idea how can I implement it?
I need to resize image,according to the specific aspect ratio.
For example if I have image with this dimensions 1600*800 the ratio is 2:1,
let's say I need to resize the image so the ratio have to be like that 2:3.
Any idea how can I implement it?
just set the width based on the height value * a scalar
width = height * 2 //2:1
width = height * 0.66 //2:3