Sub topic 7
Resolution: how many pixels per inch you need
This chapter assumes you can place images in a layout application and know the difference between pixels, inches, and millimeters. It also assumes you can tell a photo from line art. Here you learn how to work out how many pixels an image needs for a given print size.
What resolution means in print
Resolution in print is measured in pixels per inch (ppi). It says how many image pixels are packed into one inch of printed length. A printer's own dots are a different thing: they are measured in dots per inch (dpi), and a printer uses many dots to build up one image pixel. Most commercial printers ask for ppi, so this chapter uses ppi.
A screen only needs enough pixels to fill the display. A printed sheet is read from close range, so the eye can see small pixels as blocks or soft edges. The usual target for photos in print is 300 ppi at the final placed size.
The pixel count does not change when you change the ppi label. A file of 1800 pixels is 1800 pixels. The ppi value only tells you how large it will print at that density.
The core formula
To find the pixels you need, multiply the print length in inches by the ppi:
pixels = inches × ppiIf your sizes are in millimeters, divide by 25.4 first. Do this for width and height. Remember to include the bleed in the length when the image fills the page edge to edge.
The code below does this for an A4 page with 3 mm bleed on each side. The bleed makes the full size 216 × 303 mm, so a background that covers it needs more pixels than the trim size alone.
import math
MM_PER_INCH = 25.4
def document_size_with_bleed(trim_w_mm, trim_h_mm, bleed_mm=3):
"""Return the full document size including bleed on all four sides."""
return trim_w_mm + 2 * bleed_mm, trim_h_mm + 2 * bleed_mm
def pixels_needed(size_mm, ppi=300):
"""Pixels needed to cover a length in millimeters at the given ppi."""
return math.ceil(size_mm / MM_PER_INCH * ppi)
w_mm, h_mm = document_size_with_bleed(210, 297, bleed_mm=3) # A4 with 3 mm bleed
print(w_mm, h_mm) # 216 303
print(pixels_needed(w_mm), pixels_needed(h_mm)) # 2552 3579The function rounds up with math.ceil. Rounding up means you never come out a pixel short.
Choosing a target ppi
The right number depends on the content and how it is viewed.
| Content | Typical target |
|---|---|
| Photos in brochures, flyers, books | 300 ppi |
| Fine detail, such as small product shots | 300 ppi or more |
| Line art as a bitmap | 600 to 1200 ppi |
| Large posters seen from farther away | 100 to 200 ppi |
Check your printer's file guide, since they may state their own minimum.
How the pieces connect
Common errors
- Trusting the ppi tag in the file. The number stored in a file's metadata is only a label. What matters is the pixel count against the placed size.
- Upsampling to fix a small image. Resizing in software adds pixels by guessing. It makes the file bigger, but it does not add real detail.
- Using a web image. Images saved from a website are usually small and heavily compressed. They are rarely fit for print.
- Forgetting bleed. The image is sized for the trim and then falls short at the edges.
The next chapters build on this. Scaling an image inside the layout changes its resolution again, so you will need to check it at the placed size.
Exercise
A full-bleed background must cover a 5 × 7 inch card with 0.125 inch bleed on every side. How many pixels wide and tall does the image need at 300 ppi?
Show answer
The full size is 5 + 2 × 0.125 = 5.25 inches wide and 7 + 2 × 0.125 = 7.25 inches tall. Multiply by 300 ppi: 5.25 × 300 = 1575 pixels wide, and 7.25 × 300 = 2175 pixels tall.
Exercise
A photo is 2400 pixels wide. Will it reach 300 ppi if it is placed 10 inches wide?
Show answer
No. 2400 pixels divided by 10 inches gives 240 ppi. To reach 300 ppi, the photo must be placed no wider than 8 inches (2400 / 300), or you need a larger source image of at least 3000 pixels.