Image scaling

From Wikipedia, the free encyclopedia

In computer graphics, image scaling is the process of resizing a digital image. Scaling is a non-trivial process that involves a trade-off between efficiency, smoothness and sharpness. As the size of an image is increased, so the pixels which comprise the image become increasingly visible, making the image appear "soft". Conversely, reducing an image will tend to enhance its smoothness and apparent sharpness.

Apart from fitting a smaller display area, image size is most commonly decreased (or subsampled or downsampled) in order to produce thumbnails. Enlarging an image (upsampling or interpolating) is generally less common. The main reason for this is that in "zooming" an image, it is not possible to discover any more information in the image than already exists, and image quality inevitably suffers. However, there are several methods of increasing the number of pixels that an image contains, which evens out the appearance of the original pixels.

[edit] Scaling methods

An image size can be changed in several ways. Consider doubling the size of the following image:

Image:Image-before-scaling.png

The easiest way of doubling its size is nearest-neighbour interpolation, replacing every pixel with four pixels of the same color:

Image:Image-after-trivial-scaling.png

The resulting image is larger than the original, and preserves all the original detail, but has undesirable jagginess. The diagonal lines of the W, for example, now show the characteristic "stairway" shape.

Other scaling methods are better at preserving smooth contours in the image. For example, bilinear interpolation produces the following result:

Image:Image-after-linear-interpolation.png

Linear (or bilinear, in two dimensions) interpolation is typically better than the nearest-neighbor system for changing the size of an image, but causes some undesirable softening of details and can still be somewhat jagged. Better scaling methods include bicubic interpolation:

Image:Image-after-cubic-interpolation.png

[edit] See also

[edit] External links

Languages