- Image scaling
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 thepixel s 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.caling methods
An image size can be changed in several ways. Consider doubling the size of the following
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, 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: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 :There are also advanced magnifying methods developed for computer graphics called
supersampling . The best results are achieved when magnifying images with low resolution and few colors.ee also
*
Pixel art scaling algorithms
*Bicubic interpolation
*Bilinear interpolation
*Lanczos resampling
*Spline interpolation
*Seam carving
*Supersampling External links
* [http://scien.stanford.edu/class/psych221/projects/99/emkwok B/W and color scaling]
* [http://www.dpreview.com/learn/?/Glossary/Digital_Imaging/Interpolation_01.htm Interpolation by Vincent Bockaert]
* [http://www.hiend3d.com/hq3x.html Fast, high quality scaling for game console emulators]
* [http://www.leptonica.com/scaling.html General Scaling - Leptonica]
* [http://www.codeproject.com/KB/graphics/freeimage_display_demo.aspx FreeImage Display Demo]
Wikimedia Foundation. 2010.