Image scaling

Short description: Changing the resolution of a digital image

An image scaled with nearest-neighbor scaling (left) and 2×SaI scaling (right)

In computer graphics and digital imaging, image scaling is the resizing of a digital image. In video technology, the magnification of digital material is known as upscaling or resolution enhancement.

When scaling a vector graphic image, the graphic primitives that make up the image can be rendered using geometric transformations at any resolution with no loss of image quality. When scaling a raster graphics image, a new image with a higher or lower number of pixels must be generated. In the case of decreasing the pixel number (scaling down), this usually results in a visible quality loss. From the standpoint of digital signal processing, the scaling of raster graphics is a two-dimensional example of sample-rate conversion, the conversion of a discrete signal from a sampling rate (in this case, the local sampling rate) to another.

## Contents

* 1 Mathematical
* 2 Algorithms
* 2.1 Nearest-neighbor interpolation
* 2.2 Bilinear and bicubic interpolation
* 2.3 Sinc and Lanczos resampling
* 2.4 Box sampling
* 2.5 Mipmap
* 2.6 Fourier-transform methods
* 2.7 Edge-directed interpolation
* 2.8 hqx
* 2.9 Vectorization
* 2.10 Deep convolutional neural networks
* 3 Applications
* 3.1 General
* 3.2 Video
* 3.3 Pixel-art scaling
* 3.4 Real-time scaling
* 4 See also
* 5 References

## Mathematical

Image scaling can be interpreted as a form of image resampling or image reconstruction from the view of the Nyquist sampling theorem. According to the theorem, downsampling to a smaller image from a higher-resolution original can only be carried out after applying a suitable 2D anti-aliasing filter to prevent aliasing artifacts. The image is reduced to the information that can be carried by the smaller image.

In the case of up sampling, a reconstruction filter takes the place of the anti-aliasing filter.

* Original 160x160px image

* Original image in spatial-frequency domain

* 2D low-pass filtered, but still at 160x160px

* Filtered image in spatial-frequency domain

* low-pass filtered 160x160px image 4× downsampled to 40x40px

* 4× Fourier upsampling of 40x40px downsampled image to 160x160px (correct reconstruction)

* 4× Fourier upsampling of 40x40px downsampled image to 160x160px (with aliasing)

A more sophisticated approach to upscaling treats the problem as an inverse problem, solving the question of generating a plausible image that, when scaled down, would look like the input image. A variety of techniques have been applied for this, including optimization techniques with regularization terms and the use of machine learning from examples.

## Algorithms

See also: Comparison gallery of image scaling algorithms

An image size can be changed in several ways.

### Nearest-neighbor interpolation

This algorithm is often preferred for images which have little to no smooth edges. A common application of this can be found in pixel art.

### Bilinear and bicubic interpolation

### Sinc and Lanczos resampling

### Box sampling

### Mipmap

Another solution to the downscale problem of bi-sampling scaling is mipmaps. A mipmap is a prescaled set of downscaled copies. When downscaling, the nearest larger mipmap is used as the origin to ensure no scaling below the useful threshold of bilinear scaling. This algorithm is fast and easy to optimize. It is standard in many frameworks, such as OpenGL. The cost is using more image memory, exactly one-third more in the standard implementation.

### Fourier-transform methods

Simple interpolation based on the Fourier transform pads the frequency domain with zero components (a smooth window-based approach would reduce the ringing). Besides the good conservation (or recovery) of details, notable are the ringing and the circular bleeding of content from the left border to the right border (and the other way around).

### Edge-directed interpolation

Edge-directed interpolation algorithms aim to preserve edges in the image after scaling, unlike other algorithms, which can introduce staircase artifacts.

Examples of algorithms for this task include New Edge-Directed Interpolation (NEDI),[1][2] Edge-Guided Image Interpolation (EGGI),[3] Iterative Curvature-Based Interpolation (ICBI),[4] and Directional Cubic Convolution Interpolation (DCCI).[5] A 2013 analysis found that DCCI had the best scores in peak signal-to-noise ratio and structural similarity on a series of test images.[6]

### hqx

For magnifying computer graphics with low resolution and/or few colors (usually from 2 to 256 colors), better results can be achieved by hqx or other pixel-art scaling algorithms. These produce sharp edges and maintain a high level of detail.

### Vectorization

Vector extraction, or vectorization, offers another approach. Vectorization first creates a resolution-independent vector representation of the graphic to be scaled. Then the resolution-independent version is rendered as a raster image at the desired resolution. This technique is used by Adobe Illustrator, Live Trace, and Inkscape.[7] Scalable Vector Graphics are well suited to simple geometric images, while photographs do not fare well with vectorization due to their complexity.

### Deep convolutional neural networks

This method uses machine learning for more detailed images, such as photographs and complex artwork. Programs that use this method include waifu2x, Imglarger and Neural Enhance.

Demonstration of conventional vs. waifu2x upscaling with noise reduction, using a detail of Phosphorus and Hesperus by Evelyn De Morgan. [Click image for full size]

* Original image

* Image upscaled 200% using PaintShop Pro

* Image upscaled 200% using waifu2x in Photo mode with Medium noise reduction

* Image upscaled 400% using Topaz A.I. Gigapixel with Low noise reduction

* Image upscaled 400% using RealSR DF2K-JPEG

AI-driven upscaling software such as the MyHeritage Photo Enhancer allows detail and sharpness to be added to historical photographs, where it is not present in the original.

* Low-quality 270×368 pixel photograph of John Howard Lindauer, scanned from a State Legislature directory

* The same image enhanced and upscaled to 2160×2944 pixels by MyHeritage's Photo Enhancer

The availability of AI upscaling tools has led to confusion where a person believes that the upscaled version of a blurry image is genuinely showing them the subject of the original photograph.[8]

## Applications

### General

Image scaling is used in, among other applications, web browsers,[9] image editors, image and file viewers, software magnifiers, digital zoom, the process of generating thumbnail images, and when outputting images through screens or printers.

### Video

This application is the magnification of images for home theaters for HDTV-ready output devices from PAL-Resolution content, for example, from a DVD player. Upscaling is performed in real time, and the output signal is not saved.

### Pixel-art scaling

Main article: Pixel-art scaling algorithms

As pixel-art graphics are usually low-resolution, they rely on careful placement of individual pixels, often with a limited palette of colors. This results in graphics that rely on stylized visual cues to define complex shapes with little resolution, down to individual pixels. This makes scaling pixel art a particularly difficult problem.

Specialized algorithms[10] were developed to handle pixel-art graphics, as the traditional scaling algorithms do not take perceptual cues into account.

Since a typical application is to improve the appearance of fourth-generation and earlier video games on arcade and console emulators, many are designed to run in real time for small input images at 60 frames per second.

Such filters are currently used in commercial emulators on Xbox Live, Virtual Console, and PSN to allow classic low-resolution games to be more visually appealing on modern HD displays. Recently released games that incorporate these filters include Sonic's Ultimate Genesis Collection, Software:Castlevania: The Dracula X Chronicles, Software:Castlevania: Symphony of the Night, and Akumajō Dracula X Chi no Rondo.

### Real-time scaling

A number of companies have developed techniques to upscale video frames in real-time, such as when they are drawn on screen in a video game. Nvidia's deep learning super sampling (DLSS) uses deep learning to upsample lower-resolution images to a higher resolution for display on higher-resolution computer monitors.[11] AMD's FidelityFX Super Resolution 1.0 (FSR) does not employ machine learning, instead using traditional hand-written algorithms to achieve spatial upscaling on traditional shading units. FSR 2.0 utilises temporal upscaling, again with a hand-tuned algorithm. FSR standardized presets are not enforced, and some titles such as Dota 2 offer resolution sliders.[12] Other technologies include Intel XeSS and Nvidia Image Scaler (NIS).[13][14]

## See also

* Bicubic interpolation
* Bilinear interpolation
* Image reconstruction
* Lanczos resampling
* Spline interpolation
* Seam carving
* Video scaler
* Scaling (geometry)

## References

1. ↑ "Edge-Directed Interpolation". http://chiranjivi.tripod.com/EDITut.html.
2. ↑ Xin Li; Michael T. Orchard. "NEW EDGE DIRECTED INTERPOLATION". 2000 IEEE International Conference on Image Processing: 311. http://www.csee.wvu.edu/~xinl/papers/ICIP2000a.pdf.
3. ↑ Zhang, D.; Xiaolin Wu (2006). "An Edge-Guided Image Interpolation Algorithm via Directional Filtering and Data Fusion". IEEE Transactions on Image Processing 15 (8): 2226–38. doi:10.1109/TIP.2006.877407. PMID 16900678. Bibcode: 2006ITIP...15.2226Z.
4. ↑ "ImagezO Image Resizer". 11 January 2025. https://imagezo.com/image-resizer/.
5. ↑ "Image Zooming Using Directional Cubic Convolution Interpolation". http://www.mathworks.com/matlabcentral/fileexchange/38570-image-zooming-using-directional-cubic-convolution-interpolation.
6. ↑ Shaode Yu; Rongmao Li; Rui Zhang; Mou An; Shibin Wu; Yaoqin Xie (2013). "Performance evaluation of edge-directed interpolation methods for noise-free images". arXiv:1303.6455 [cs.CV].
7. ↑ Johannes Kopf and Dani Lischinski (2011). "Depixelizing Pixel Art". ACM Transactions on Graphics 30 (4): 99:1–99:8. doi:10.1145/2010324.1964994. http://research.microsoft.com/en-us/um/people/kopf/pixelart/. Retrieved 24 October 2012.
8. ↑ Growcoot, Matt (5 September 2025). "Trump Photo Shows The Perils of AI Upscaling Tools" (in en). PetaPixel. https://petapixel.com/2025/09/05/trump-photo-shows-the-perils-of-ai-upscaling-tools/.
9. ↑ Analysis of image scaling algorithms used by popular web browsers
10. ↑ "Pixel Scalers". http://www.datagenetics.com/blog/december32013/index.html.
11. ↑ "NVIDIA DLSS: Your Questions, Answered" (in en-us). https://www.nvidia.com/en-us/geforce/news/nvidia-dlss-your-questions-answered/.
12. ↑ "Valve's Dota 2 Adds AMD FidelityFX Super Resolution - Phoronix". https://www.phoronix.com/scan.php?page=news_item&px=Dota-2-FidelityFX-Super-Res.
13. ↑ Gartenberg, Chaim (2021-08-19). "Intel shows off its answer to Nvidia's DLSS, coming to Arc GPUs in 2022" (in en). https://www.theverge.com/2021/8/19/22631061/intel-arc-gpu-alchemist-xe-ss-super-sampling-ai-architecture-day-preview.
14. ↑ "What Is Nvidia Image Scaling? Upscaling Tech, Explained" (in en). 2021-11-16. https://www.digitaltrends.com/computing/what-is-nvidia-image-scaling/.

{{Navbox |name = Video processing |title = Video processing |state = autocollapse |listclass = hlist |basestyle = text-align:center;

|group1 = Post-processing |list1 =

* Deblocking
* Resizing
* Comparison
* Deinterlacing
* Denoising
* Deflicking

|group2 = Special processing |list2 =

* [[Engineering:Film colorizatFilm colorization&nbsp;(tinting)
* Color grading
* Film look
* Super-resolution imaging
* Uncompressed
* Pixel art scaling

|group3 = 24 to 30 fps conversion |list3 =

* Telecine (3:2 pulldown)

|group4 = 30 to 24 fps conversion |list4 =

* Inverse telecine

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Image scaling. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Image_scaling&oldid=4152077"