I'm working on a project about downloadable stock photos for my client.
They gave me a few example sites to see what they exactly want.
They want options for more than one size like here (XXXL, XXL, XL, L, M, S):
I wonder how is the calculation works for creating different sizes, I think there is no fixed ratio like 1.2, 2, 3 etc.
XXXL and XXL RATIO
11252 / 7381 = 1.52~
How they make a calculation for creating different sizes?
I believe iStockPhoto bases its calculation on print size. For example, as you can read, they sell these formats:
So, they first get the desired print size (e.g. 17.7" x 5.2"), they specify the print resolution (72 dpi is good for screens; 300dpi is for good quality prints) and eventually they convert that to pixels. The last step is pretty straightforward: if you want 8.5" at 300 dpi (points per inch), assuming that 1 point = 1 pixel (not true with Retina displays, for example, but correct for prints), then you get 8.5 * 300 = 2550 pixel. The resolution should be 2550x750 pixel; the difference could be explained with the fact that the ratio of the image is not exactly 3.4:1.
Anyways, after you've decided the maximum size, you can resize the photo until it fits. And that's an easy proportion:origWidth : origHeight = targetWidth : targetHeight