Image scaling
From Wikipedia, the free encyclopedia
Image scaling is the process of changing the size of a digital image. Scaling is a non-trivial process that involves a trade-off between speed, smoothness and sharpness. When increasing the size of images, the fact that digital images are made of pixels becomes particularly evident.
Image scaling can involve either subsampling (reducing or shrinking an image) or zooming (enlarging an image).
[edit] Scaling methods
An image size can be changed in several ways. Consider doubling the size of following image:
The easiest way of doubling its size is nearest neighbour interpolation, replacing every pixel with four pixels of the same color:
The resulting image is larger than the original, but has lost some detail. The diagonal lines of the W, for example, now have the shape of a stairway and are much more jagged.
Other scaling methods are better at preserving the original shape of the image. For example, linear interpolation produces the following result:
Linear interpolation is typically better than the trivial system for changing the size of an image, but is not perfect. Even better scaling methods are bilinear interpolation and, shown below, cubic interpolation: