Share on Facebook Share on Twitter Email
Answers.com

Image scaling

 
Wikipedia: 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 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.

Scaling methods

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

Image-before-scaling.png

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

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-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-after-cubic-interpolation.png

For magnifying computer graphics with low resolution and/or few colors (usually from 2 to 256 colors) the best results will be achieved by hq2x or similar scaling algorithms. These produce sharp edges and maintain high level of detail:

Image-after-hq2x.png


For scaling photos (and raster images with lots of colors) see also anti-aliasing algorithms called supersampling.

See also

External links


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Image scaling" Read more