Calculating the 'perfect' dimensions to get to 640k pixels.

in Miscellaneous
By kirbsand/Kirby (5,526) Send mail to this user on September 19, 2012 9:29:29 AM CDT

back to how you calculate, step by step

The may have been covered somewhere else, but I couldn't find it. The question comes up constantly in photo critiques on this site and so I wanted a place to refer people to.
How to you figure out how big you can submit your photo?

You are allowed 640000 pixels, your photo allready has a specific amount of pixels - probably more. How much do you resize it?
In words, you first figure out how many pixels you have, take the ratio of the pixels you have to the pixels you want and then multiply the square root of that ratio by your current hight and width to get your new hight and width.

WAIT!
Where does square root come in?! You ask. lets say your photo is 4 x 4 for 16 pixels, but you are only allowed 4 pixels. This is obviously silly, but it makes the math easy. Your photo is square, and everyone knows that the square that has 4 pixels is a 2 by 2 square. The ratio of your current area to your desired area is 4 to 1, but the ratio of your disired side lengths to your current is 2 to 1. This is because the ratio of the lengths gets multiplied by itself (squared) when creating the area.

back to how you calculate, step by step

  1. figure out your current area - (X*Y)
  2. figure out the ratio of your current area to your desired area - (X*Y/640000)
  3. take the square root of the previous step to get your desired dimension ratio - ( (X*Y/640000)^.5)
  4. multiply the desired dimension ratio times your length and width to get the new dimensions
  5. the formulas for that are Width=X*( (X*Y/640000)^.5) and Height=Y*( (X*Y/640000)^.5)
It may look complicated, but it is very easy to put in a spreadsheet and have it auto-calculated for you just before you resize for submission.

Don't forget to re-sharpen after re-sizing.

Read 2,058 times

Reply 

From 800lbjackalope/Aaron (1,842) Send mail to this user on October 17, 2012 1:49:36 AM CDT

For me I use the resize tool in CS5. I lock the aspect ratio and change the units of measure from inches or pixels to percentage in the new file size boxes. I leave the units of measure in the document size window as pixels. I then open the calculator. I enter an amount of size reduction by percentage that I think will get me close and before I apply I multiply the new pixel dimensions that are automatically generated in the document size window and if they are still to big I just enter a lower percentage until I am under the 640K. By using percentage with a locked aspect ratio there is no need to figure the square root. For reducing an average jpg file from my camera (T2i)I end up with a document reduced to about 20 to 30 percent of the original file size.

Reply 

From swilcox/Steve (10,298) Send mail to this user on November 8, 2012 1:39:34 PM CST

Kirby -- I like this idea, but it doesn't work for me. If I understand your process, shouldn't your ratio be 640000/(X*Y)?

Assuming my original is larger than the allowed 640000 pixels, the ratio in your formula will be greater than 1, as will be the square root. So in the final multiplications of X and Y, my new dimensions will be larger than the original rather than smaller.

I believe it gives the right results with the ratio inverted.

Reply 

From jduckett/John (4,212) Send mail to this user on February 4, 2013 9:34:25 PM CST

I have written a little app that does the calculations for you. You enter the dimensions of your original image and the required number of pixels in the resized image. The app calculates the scaling percentage and the dimensions of the scaled down image.

I've only tried it on a Windows machine but as it uses .NET so I suppose it should be able to run on any OS that has .NET4 installed.

Get it here.

Please PM me to let me know what operating system you use and if it works for you.

I've only just created a Rapidshare account for this so, if you have download problems, PM me about that too.

Reply 

Return to articles