Interpolation filters
Interpolation is required to eliminate a blocky appearance of a rescaled bitmap image due to changes in the number of pixels. Interpolation resamples bitmap image data and attempts to avoid a blocky pixelated appearance. Because the visual result of each filter can look different when applied to various types of images, it is up to the user to choose a suitable interpolation filter.
There are three filters available for use with bitmap image scaling methods.
Filter |
Description |
|---|---|
Bitmap.FILTER_LANCZOS |
The Lanczos filter is the slowest of the available interpolation filters. Lanczos interpolation can produce sharp images, but might introduce some ringing artifacts. |
Bitmap.FILTER_BOX |
The box filter, also known as a mean filter, smoothing filter, and averaging filter, can quickly produce blurry images. |
Bitmap.FILTER_BILINEAR |
The bilinear filter can quickly produce good results for resized images, but might display sharp transition lines. This filter is often used to render bitmap image previews. |