Guide
Staged downscaling: the evidence
One test picture, three ways to shrink it, and how far each lands from the exact answer — measured, with the small differences published too.
Does resizing lose quality argues that this resizer halves a picture repeatedly before its final pass, instead of jumping straight to the target. This page is the measurement behind that argument, small differences included.
The test
- The source is a 1024 × 1024 zone plate: rings that start flat at the centre and get finer towards the edge until, at the corners, they alternate every pixel — plus a strip of one-pixel lines along the bottom. It is generated by code, so every run starts from identical pixels.
- It is reduced to 256 px (4 : 1) and 128 px (8 : 1).
- The yardstick is the exact area average: each output pixel is compared with the mean of the block of source pixels it covers.
- Each method is scored by its root-mean-square difference from that, in 8-bit grey levels, plus its single largest difference. Lower is closer.
Numbers from the shipped resampler
Generated when the site is built, by running the resampler this site ships on the test picture. Each output's SHA-256 is recorded; if a change to the resampler moves one byte, the build fails until this table is regenerated.
| Reduction | Method | RMS difference | Largest | Output SHA-256 |
|---|---|---|---|---|
| 4 : 1 → 256 px | Staged (halvings, then Lanczos3) | 1.02 | 2 | 149307985836… |
| 4 : 1 → 256 px | One Lanczos3 pass | 11.95 | 49 | bf469905b154… |
| 8 : 1 → 128 px | Staged (halvings, then Lanczos3) | 1.48 | 2 | 7900a4ea8b90… |
| 8 : 1 → 128 px | One Lanczos3 pass | 6.19 | 45 | 52b86c14d699… |
Run it in your browser
The same picture, reduced here and now by the resizer's own code and by your browser's canvas scaler — the method most web pages use. Browsers differ in how their scaler works, so its row is measured live rather than printed.
The loupe shows the outer corner at 400%, where the rings are finest and aliasing shows first. Lower is closer to the exact average.
What the numbers say, and do not
The staged reduction lands within one or two levels of the exact average (RMS 1.02 at 4 : 1, 1.48 at 8 : 1, from rounding at each step), because each halving is itself an average of four pixels. A single Lanczos3 pass is sharper by design and pays for it near the finest rings: its negative lobes ring, and pattern close to the pixel grid comes back as false rings (moiré) that the loupe shows. Halving first lets every source pixel count before the last pass.
One result the lab shows that the table cannot: in the Chromium build we tested, the canvas scaler at its high setting also lands within about a level of the exact average on this picture — slightly closer than the staged chain, because at a whole-number ratio it averages whole blocks too. Other browsers' scalers work differently and some do not, which is why its row is measured live rather than printed, and why this site does its own resampling rather than depending on whichever scaler a visitor's browser has.
This is one synthetic picture at two whole-number ratios. It is built to expose aliasing, not to stand in for every photograph; on a soft portrait the methods are close. The table is regenerated, not edited, so it says whatever the shipped code produces.
Questions
Is the staged method always better?
Not by the same amount on every picture. The difference is concentrated where fine pattern meets a large reduction — the outer rings here, fabric, brickwork and text in real photos — which is where a single pass rings and aliases. On a soft portrait with little fine detail the methods come out close.
Why compare against the exact average?
Because at a whole-number ratio it is the honest answer to what one output pixel should be: the mean of the block of source pixels it covers. It is also the blurriest possible answer, so a sharper filter scoring a little worse on flat grey is expected; what matters is the error in the fine rings, where aliasing turns detail into false patterns.
Can I check these numbers myself?
Yes. The lab on this page computes them in your browser from the same code the resizer runs, and the source picture downloads in one click to test in any other tool. The table above it is generated when the site is built, and the build stops if the resampler's output changes without the table being regenerated.
