CCalclabhub

Work

Pixels kept by a downscale

Halving both dimensions quarters the pixel count, which is why file sizes fall much faster than the numbers on the dimensions box. It is also why an upscale gains almost nothing noticeable.

The Formula

fraction kept = s squared, because area scales with the square of the length factor

Halving both dimensions quarters the pixel count, which is why file sizes fall much faster than the numbers on the dimensions box. It is also why an upscale gains almost nothing noticeable.

SymbolMeaning
sScale factor
P_srcSource pixels
P_outOutput pixels
fFraction kept

What Each Symbol Means

sratio

Scale factor

The number both dimensions were multiplied by.

P_srcpixels

Source pixels

w times h of the original image.

P_outpixels

Output pixels

Pixels in the resized image.

fratio

Fraction kept

P_out divided by P_src.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to resize product images page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Resize Product Images, filed under Everyday Life. Every number the guide produces comes from substituting into this one line.