The OpenD Programming Language

ScalingFilter

Interpolation methods to apply when scaling images

Each filter has its own distinctive properties.

Bilinear filtering (linear) is general-purpose. Works well with photos.

For pixel graphics the retro look of nearest (as in nearest neighbor) is usually the option of choice.

When used as a parameter, it shall be understood as a hint.

Implementations are not required to support all enumerated options and may pick a different filter as a substitute at their own discretion.

Values

ValueMeaning
nearest

Nearest neighbor interpolation

Also known as proximal interpolation and point sampling.

Visual impression: “blocky”, “pixelated”, “slightly displaced”
bilinear

Bilinear interpolation

(Uses arithmetic mean for downscaling.)

Visual impression: “smooth”, “blurred”
linearbilinear

Meta