Nearest-neighbor interpolation (source code)

= Nearest-neighbor interpolation
{wiki}

<Nearest-neighbor interpolation> assigns each requested location the value of its nearest available sample, with a specified convention for ties. In <lossy block averaging>, samples are placed at block centres and each is copied into its four original <pixel> positions. This enlarges the <raster image> without recovering discarded detail.