The Fundamental Problem with Enlarging Images
When you enlarge a digital image, you are asking the software to create pixels that do not exist. A 500x500 image contains 250,000 pixels. Scaling it to 2000x2000 requires 4,000,000 pixels -- 3.75 million pixels that need to be invented from the original data. The quality of those invented pixels determines whether the result looks sharp or blurry.
Traditional upscaling methods (nearest neighbor, bilinear, bicubic, Lanczos) use mathematical interpolation to guess what the new pixels should look like. They work reasonably well for small enlargements (up to 2x) but produce increasingly blurry or artificial-looking results at larger scales.
AI-powered upscaling changed the game. Neural networks trained on millions of image pairs learn to predict high-resolution details from low-resolution inputs. They do not just interpolate -- they synthesize plausible detail, adding sharpness, texture, and structure that traditional methods cannot create.
This guide covers both approaches in depth, helping you choose the right tool and settings for your specific upscaling needs.

Traditional Upscaling Methods
Understanding Interpolation Algorithms
| Algorithm | Quality | Speed | Best For | Artifacts |
|---|---|---|---|---|
| Nearest Neighbor | Lowest | Fastest | Pixel art, retro graphics | Blocky, pixelated |
| Bilinear | Low-Medium | Fast | Quick previews | Blurry, soft edges |
| Bicubic | Medium | Moderate | General purpose | Slight ringing, soft |
| Lanczos | High | Moderate | Photographs, detailed images | Minimal ringing |
| Sinc | High | Slow | Scientific imaging | Ringing near edges |
Lanczos: The Best Traditional Method
Lanczos interpolation uses a sinc function windowed to a finite number of input pixels, producing sharper results than bicubic with fewer artifacts. It is the recommended traditional method for enlarging photographs.
# ImageMagick with Lanczos filter (2x upscale)
magick input.jpg -filter Lanczos -resize 200% output.jpg
# With sharpening after upscale (improves perceived quality)
magick input.jpg -filter Lanczos -resize 200% \
-unsharp 0x0.75+0.75+0.008 output.jpg
# Sharp with Lanczos (Node.js)
const sharp = require("sharp");
await sharp("input.jpg")
.resize(2000, 1500, {
kernel: sharp.kernel.lanczos3,
withoutEnlargement: false,
})
.sharpen({ sigma: 0.8, m1: 0.5, m2: 0.5 })
.jpeg({ quality: 90, mozjpeg: true })
.toFile("output.jpg");
When Traditional Upscaling Is Sufficient
- Enlarging by less than 2x
- Preview or draft quality is acceptable
- Processing speed is critical (batch processing thousands of images)
- The image will be viewed at a distance (posters, banners)
- Pixel art where you specifically want the blocky look (use nearest neighbor)
For resizing images without upscaling, see our resize image tool and our guide on how to resize images without quality loss.
AI Upscaling Methods
AI upscaling (also called "super resolution") uses deep learning models to generate realistic high-resolution detail from low-resolution input. The results are dramatically better than traditional interpolation, especially at 4x and higher scale factors.
How AI Upscaling Works
- The low-resolution image is fed into a neural network
- The network has been trained on millions of high-res/low-res image pairs
- It predicts what high-frequency details (edges, textures, fine structures) should exist
- The output contains synthesized detail that was not in the original image
This means AI upscaling is technically hallucinating detail. The added sharpness and texture look convincing but are not guaranteed to be accurate to the original scene. This is fine for most practical purposes but is important to understand for forensic or scientific use.
Real-ESRGAN (Open Source, Best Overall)
Real-ESRGAN is the current state-of-the-art for general-purpose image upscaling. It handles photographs, illustrations, anime/manga, and mixed content excellently.
# Install Real-ESRGAN
pip install realesrgan
# Basic 4x upscale
python -m realesrgan -i input.jpg -o output.jpg -s 4
# 2x upscale (faster, less hallucination)
python -m realesrgan -i input.jpg -o output.jpg -s 2
# Batch upscale a directory
python -m realesrgan -i ./low_res/ -o ./high_res/ -s 4
# Using the anime-specific model
python -m realesrgan -i input.png -o output.png -s 4 \
-n realesrgan-x4plus-anime
Waifu2x (Anime/Illustration Specialist)
Waifu2x was one of the first AI upscalers and remains excellent for anime, manga, and flat-color illustrations:
# Using waifu2x-ncnn-vulkan (GPU accelerated)
waifu2x-ncnn-vulkan -i input.png -o output.png -s 2 -n 3
# Flags:
# -s 2: 2x scale
# -n 3: noise reduction level (0-3, higher = more denoising)
Topaz Gigapixel AI (Commercial, GUI)
Topaz Gigapixel AI is the most popular commercial option. It offers:
- Up to 6x upscaling
- Face recovery for portraits
- Multiple AI models optimized for different content types
- Batch processing with GPU acceleration
- Before/after preview
ESPCN / EDSR (Lightweight Models)
For embedding in applications or APIs where inference speed matters:
import cv2
# Load pre-trained EDSR model (OpenCV DNN)
sr = cv2.dnn_superres.DnnSuperResImpl_create()
sr.readModel("EDSR_x4.pb")
sr.setModel("edsr", 4)
# Upscale
img = cv2.imread("input.jpg")
result = sr.upsample(img)
cv2.imwrite("output.jpg", result)

Pro Tip: When AI upscaling photographs of people, always check faces carefully. AI models sometimes generate unrealistic skin textures, subtly alter facial features, or produce artifacts around eyes and teeth. For portraits, use a model with face enhancement (like GFPGAN integrated with Real-ESRGAN) and manually inspect results at 100% zoom.
Comparison: Traditional vs AI Upscaling
| Criteria | Traditional (Lanczos) | AI (Real-ESRGAN) |
|---|---|---|
| Quality at 2x | Good (soft but clean) | Excellent (sharp with detail) |
| Quality at 4x | Poor (noticeably blurry) | Very good (convincing detail) |
| Quality at 8x | Unusable | Acceptable (some artifacts) |
| Processing speed | Near-instant | Seconds to minutes per image |
| GPU required? | No | Recommended (10-50x faster) |
| Accuracy | Mathematically exact interpolation | Hallucinated detail (plausible but not provably accurate) |
| Batch speed (1000 images) | Minutes | Hours (GPU) to days (CPU) |
| Best for | Small enlargements, speed-critical workflows | Large enlargements, quality-critical output |
Practical Use Cases
Upscaling Old Photographs
Old family photos, scanned prints, and vintage photographs benefit enormously from AI upscaling. The combination of upscaling + denoising + face recovery can transform a blurry 300x400 scan into a crisp 1200x1600 image:
# Upscale with denoising and face recovery
python -m realesrgan -i old_photo.jpg -o restored.jpg -s 4 \
--face_enhance
Preparing Low-Res Images for Print
If you only have a web-resolution image (72 DPI) and need it for print (300 DPI):
Web image: 800x600 at 72 DPI
Print size at 300 DPI: 2.67" x 2.0" (too small)
After 4x AI upscale: 3200x2400 at 300 DPI
Print size: 10.67" x 8.0" (usable)
For more on print preparation, see our how to convert images for printing guide and image DPI and resolution guide.
Upscaling Product Images for E-Commerce
Product images from suppliers often arrive at inadequate resolutions. AI upscaling produces product images sharp enough for zoom features:
import rawpy
from realesrgan import RealESRGANer
# Upscale product image to support 2x zoom
upscaler = RealESRGANer(scale=4, model_path="RealESRGAN_x4plus.pth")
output, _ = upscaler.enhance(img, outscale=4)
Upscaling Screenshots and UI Mockups
Screenshots and UI designs with text and sharp edges need special handling. General-purpose AI models can blur text or introduce artifacts on UI elements:
# For screenshots, Lanczos + sharpening often works better than AI
magick screenshot.png -filter Lanczos -resize 200% \
-unsharp 0x1+1+0.05 screenshot_2x.png
Upscaling Game Textures
For game asset upscaling, specialized models trained on texture data produce the best results. The general Real-ESRGAN model works well for diffuse/albedo textures, while normal maps and other data textures should use traditional methods:
# Upscale diffuse textures with AI
python -m realesrgan -i textures/diffuse/ -o textures/diffuse_4x/ -s 4
# Upscale normal maps with Lanczos (AI would corrupt the data)
magick normal_map.png -filter Lanczos -resize 400% normal_map_4x.png
Pro Tip: After AI upscaling, always sharpen the output slightly. AI models produce clean results but can lack the micro-contrast that makes images feel truly sharp. A light unsharp mask (radius 0.5-1.0, amount 50-75%) adds crispness without introducing artifacts. Use the image enlarger tool for a quick AI-powered upscale with built-in sharpening.

Optimizing After Upscaling
AI-upscaled images can be very large. Optimize them for your delivery medium:
For Web Delivery
Convert to WebP or AVIF for the best file size:
# Convert upscaled PNG to optimized WebP
cwebp -q 85 upscaled.png -o upscaled.webp
# Or use AVIF for even smaller files
avifenc --min 25 --max 35 upscaled.png upscaled.avif
Use our WebP converter or AVIF converter for quick format conversion.
For Print
Save as TIFF or high-quality JPG:
# Print-ready output
magick upscaled.png -density 300 -quality 95 upscaled_print.jpg
See our best file formats for printing guide for format recommendations.
For Compression
Run through our image compressor or compress JPEG tool to reduce file size while maintaining the upscaled quality.
Batch AI Upscaling
For processing large collections of images:
import os
import glob
from realesrgan import RealESRGANer
from basicsr.archs.rrdbnet_arch import RRDBNet
import cv2
def batch_upscale(input_dir, output_dir, scale=4):
os.makedirs(output_dir, exist_ok=True)
# Initialize model
model = RRDBNet(num_in_ch=3, num_out_ch=3,
num_feat=64, num_block=23, num_grow_ch=32)
upscaler = RealESRGANer(
scale=scale,
model_path="RealESRGAN_x4plus.pth",
model=model,
tile=400, # Process in tiles to reduce memory
tile_pad=10,
pre_pad=0,
half=True # FP16 for faster processing
)
images = glob.glob(os.path.join(input_dir, "*.{jpg,png,webp}"))
for img_path in images:
img = cv2.imread(img_path, cv2.IMREAD_UNCHANGED)
output, _ = upscaler.enhance(img, outscale=scale)
filename = os.path.basename(img_path)
cv2.imwrite(os.path.join(output_dir, filename), output)
print(f"Upscaled: {filename}")
batch_upscale("./low_res", "./high_res", scale=4)
For more batch processing approaches, see our batch processing guide and how to batch convert files tutorial.
Limitations and Honest Expectations
AI upscaling is impressive, but it is not magic:
- It cannot recover data that was never captured -- An out-of-focus photo will become a sharper-looking out-of-focus photo, not a sharp photo
- Detail is hallucinated -- The added texture and sharpness look convincing but are generated, not recovered from the original
- Faces can be altered -- AI may subtly change facial features while "enhancing" them
- Text may be mangled -- AI models struggle with text, often producing garbled or smoothed letters
- Diminishing returns past 4x -- Quality improvement plateaus and artifacts increase beyond 4x upscaling
- GIGO applies -- Garbage In, Garbage Out. A severely degraded source produces a better-looking but still flawed result
Summary
For upscaling images without losing quality, AI-based methods (Real-ESRGAN) dramatically outperform traditional interpolation at 2x and above. For small enlargements (under 2x), Lanczos interpolation remains fast and effective. For best results, start with the highest quality source image available, use the appropriate AI model for your content type (photographs, anime, textures), and optimize the output for your delivery format using our image compressor, WebP converter, or JPG converter.
For related topics, see our how to resize images without quality loss guide and optimize images for website guide.



