2.1   Overview

The method 'nearest_neighbor' is the simplest and fastest method for interpolation. It computes the resulting gray value based on only one pixel in the original image as described in section “Nearest Neighbor Interpolation ('nearest_neighbor')”. It should only be used for time-critical applications.

The method 'bilinear' considers four neighboring pixels for the interpolation (see section “Bilinear Interpolation ('bilinear')”). It produces better results with less undesired jagged edges for image transformations that include upscaling and/or rotation but no downscaling.

The methods 'constant' and 'weighted' perform a multi-step interpolation with an integrated smoothing as described in section “Equally Weighted Bilinear Interpolation ('constant')” and section “Gaussian Weighted Bilinear Interpolation ('weighted')”, respectively. They produce good results for both upscaling and downscaling. Therefore, they are best used for image transformations with an application-dependent scaling factor, which may lead to upscaling as well as to downscaling.

The methods 'bicubic' and 'bicubic_clipped' consider 16 neighboring pixels of the original image for determining the gray values (see section “Bicubic Interpolation ('bicubic' and 'bicubic_clipped')”). They provide the highest quality for upscaling at the cost of higher run times.