Choosing a resampling kernel
Every kernel answers one question — what colour belongs at a place the source never sampled — and each answers it with a different trade between sharpness, ringing and invented colour.
The kernels, in one table
A kernel is a weighting curve. For each output pixel it looks at a small window of source pixels around the matching position and blends them in proportions the curve sets. The width of that window and the shape of the curve are the whole difference.
| Kernel | Source pixels read per axis | At a hard edge | New colours |
|---|---|---|---|
| Nearest | 1 | Stays hard; steps at fractional factors | None, ever |
| Area average (box) | The block it covers | Exact block mean at a whole-number reduction; hard going up | Means of blocks only |
| Bilinear | 2 | Soft ramp | Yes, between neighbours |
| Bicubic (Catmull-Rom) | 4 | Crisp, slight overshoot | Yes |
| Mitchell (B = C = 1/3) | 4 | Softer, little ringing | Yes |
| Lanczos (a = 3) | 6 | Crispest, visible halo on high contrast | Yes, including overshoot |
The panel's automatic choice is Lanczos going down and bicubic going up: acuity is the scarce thing on a reduction, and ringing is the risk on an enlargement. The kernel strip under the stage renders the same patch through every kernel at once, with a count of the distinct colours each one produced, so the choice can be made by looking.
