Sep-11-2020, 04:38 PM
you can change the image size to fit canvas, to do this, you need to calculate the aspect ratio, and use it to get new dimensions.
The math for this is simple:
aspect ratio = orig width / orig height
so new height = new width / aspect ratio
or new width = newHeight * aspect ratio
The math for this is simple:
aspect ratio = orig width / orig height
so new height = new width / aspect ratio
or new width = newHeight * aspect ratio