Image Resolution Explained: Finally Understanding What Those Numbers Mean
Pixels, DPI, megapixels... explained in plain English. When you need 72 DPI vs 300 DPI, and why your image dimensions never seem right.
Image Resolution Explained: Finally Understanding What Those Numbers Mean
Resolution confuses absolutely everyone.
Pixels, PPI, DPI, megapixels...
Let me explain it with a story.
The Short Version
Screen display: Only pixels matter, DPI is irrelevant.
Print: DPI is everything.
记住了(记住这句话).
Basic Concepts
Pixel
The smallest unit of an image. Each pixel is a tiny colored square.
1920×1080 pixels = 2.07 million pixels
Resolution
Width × height.
| Common Resolutions | Pixel Count | Description |
|---|---|---|
| 720p | 1280×720 | HD ready |
| 1080p | 1920×1080 | Full HD |
| 2K | 2560×1440 | 2K display |
| 4K | 3840×2160 | Ultra HD |
DPI / PPI
- DPI = Dots Per Inch (for printing)
- PPI = Pixels Per Inch (for screens)
Screens only care about PPI. DPI on screens is basically just marketing talk.
The 72 DPI Myth
You might have heard "screens are 72 DPI."
That's outdated information.
Modern screens:
- iPhone: 460 PPI
- MacBook Pro: 227 PPI
- 27" 4K monitor: 163 PPI
"72 DPI is for screens" was a rule from the 1984 Mac. It's been obsolete for decades.
Screen Image Sizes
By Use Case
| Use Case | Max Width | Typical Size |
|---|---|---|
| Large banner | 1920px | 1920×1080 |
| Blog header | 1200px | 1200×630 |
| Content image | 800px | 800×600 |
| Thumbnail | 400px | 400×300 |
| Avatar | 150px | 150×150 |
Print Image Sizes
By Print Size (300 DPI)
| Print Size | Minimum Pixels | Recommended Pixels |
|---|---|---|
| 4×6" | 1200×1800 | 2400×3600 |
| 5×7" | 1500×2100 | 3000×4200 |
| 8×10" | 2400×3000 | 3600×4500 |
| A4 | 2480×3508 | 3508×4961 |
300 DPI is the print standard.
Common Mistakes
Mistake 1: Thinking Enlarging Improves Quality
Problem: Taking a small image and stretching it, thinking it'll get clearer.
Truth: Enlarging just makes each pixel bigger. No new information is added.
Solution: Accept reality. Start with a large enough image in the first place.
Mistake 2: Calculating Print Size Wrong
Problem: Want to print 8×10" but image is only 1000×1500 pixels.
Calculate:
8×10" at 300 DPI needs: 2400×3000 pixels
Your image: 1000×1500 pixels
Result: Will be blurry when printed
Solution: Calculate required pixels before printing.
Mistake 3: Not Understanding Aspect Ratios
Problem: Image ratio doesn't match print size, gets cropped.
Example:
- Original: 1920×1080 (16:9)
- Print: 8×10" (4:5)
- Result: Either crops or distorts
Solution: Calculate ratio first, then crop.
Quick Calculations
Print Pixel Calculator
def calc_print_pixels(width_inch, height_inch, dpi=300):
"""Calculate pixels needed for printing"""
width = int(width_inch * dpi)
height = int(height_inch * dpi)
mp = (width * height) / 1_000_000
return {
'width': width,
'height': height,
'megapixels': mp
}
# 8×10" at 300 DPI
result = calc_print_pixels(8, 10, dpi=300)
print(f"Needed: {result['width']}×{result['height']} ({result['megapixels']:.1f} megapixels)")
Common Aspect Ratios
| Ratio | Common Name | Use Case |
|---|---|---|
| 1:1 | Square | Avatars, Instagram |
| 4:3 | Standard | Old TV, screenshots |
| 3:2 | DSLR ratio | Photos |
| 16:9 | Widescreen | Video, banners |
| 9:16 | Vertical | Mobile stories, video |
Web vs Print
Web Images
from PIL import Image
def prepare_web(input_path, output_path, max_width=1920, quality=85):
img = Image.open(input_path)
# Only resize if over max width
if img.width > max_width:
ratio = max_width / img.width
new_height = int(img.height * ratio)
img = img.resize((max_width, new_height), Image.Resampling.LANCZOS)
# Save
img.save(output_path, 'WEBP', quality=quality)
print(f"Done: {img.width}×{img.height}")
prepare_web('photo.jpg', 'photo.webp')
Print Images
from PIL import Image
def prepare_print(input_path, output_path, print_w, print_h, dpi=300):
img = Image.open(input_path)
# Calculate needed size
need_w = int(print_w * dpi)
need_h = int(print_h * dpi)
# Check if large enough
if img.width < need_w or img.height < need_h:
print(f"Image too small!")
print(f"Needed: {need_w}×{need_h}")
print(f"Have: {img.width}×{img.height}")
return False
# Scale while maintaining ratio
target_ratio = need_w / need_h
current_ratio = img.width / img.height
if current_ratio > target_ratio:
new_h = need_h
new_w = int(new_h * current_ratio)
else:
new_w = need_w
new_h = int(new_w / current_ratio)
img = img.resize((new_w, new_h), Image.Resampling.LANCZOS)
# Save
img.save(output_path, 'JPEG', quality=95, dpi=(dpi, dpi))
print(f"Done: {img.width}×{img.height} @ {dpi}DPI")
return True
prepare_print('photo.jpg', 'print.jpg', 8, 10, dpi=300)
Summary
- Screens only care about pixels - DPI doesn't matter on screens
- Print needs 300 DPI - Calculate by actual print size
- Start large enough - Enlarging is a last resort
- 72 DPI is ancient history - Don't believe that
- Calculate before printing - Don't guess
Explained this countless times. Questions? Leave a comment.