It looks like you want to limit the pixels of the thumbnails as close to the middle area as all the other thumbnails, right?
So basically, given the h / w of the source image and the target area A:
h * w = original image pixel size (let got with 640x480 = 307,200 pixels) A = maximum number of pixels allowed (let go for 100x100 = 10,000 pixels) 307,200 / 10,000 = 30x reduction original aspect ratio = 640 / 480 = 1.3333 : 1
To calculate the new sketch size x / y:
newX * newY = 10000 newX = newY * 1.333 (newY * 1.333) * newY = 10000 newY^2 * 1.333 = 10000 newY^2 = 10000 / 1.333 newY^2 = 7502 newY = 86.6 -> 87 newX = 87 * 1.333 = 115.97 -> 116 116 x 87 = 10,092 pixels
if we rounded the dimensions of the thumbnails, we would get 86x114 = 9,804 pixels
therefore ... to convert your 640x480 image to a standard pixel size of 10,000 or more, you will need a new image size of 86-87 in height and 114-116 in width.
source share