What DPI means, and what it does not change
DPI, or dots per inch, is a number saved in an image file that tells a printer how many pixels to fit into each inch of paper. It sets the print size and nothing else. A 12 MP phone photo, 4032 pixels wide, prints 13.44 inches wide at 300 DPI and 56 at 72.
What does DPI mean in an image file?
A digital photo is a grid of pixels. The DPI is one extra number in the file's header, a note for whoever prints it. It adds no pixels, and nothing in the picture changes when it does.
JPEG keeps it in the JFIF header, and often a second time in EXIF. PNG keeps it in a chunk called pHYs. Many files carry none at all.
Divide the pixels by the DPI and you get inches. That is the whole of what it does. To set the number on your own photo without touching its pixels, use the tool to change image DPI.
Is DPI the same as PPI?
Strictly, no. The number in your file is PPI, pixels per inch. In printing, DPI is what the printer puts out and PPI is what the image brings. Most programs say DPI for both anyway.
Epson's specification sheet for its EcoTank ET-2800 printer and scanner uses the word two ways on one page. Your file's number is a third.
| Where | Counts | ET-2800 | Makes pixels |
|---|---|---|---|
| Printer | Ink dots per inch | 5760 x 1440 | No |
| Scanner | Samples per inch | 1200 optical | Yes |
| Image file | Pixels per inch | Not stated | No |
A printer's 5760 x 1440 is how finely it places droplets as small as 3 picolitres, Epson says. It mixes many dots to make the colour of each of your pixels, so it is not a figure to match in your file.
What does DPI decide when you scan?
This is the one DPI that makes pixels. A scanner reads the paper at the DPI you choose, so the setting decides how many pixels the scan has. Doubling it gives four times as many.
| Scan setting | Pixels in the scan | Megapixels |
|---|---|---|
| 300 DPI | 1800 x 1200 | 2.2 MP |
| 600 DPI | 3600 x 2400 | 8.6 MP |
| 1200 DPI | 7200 x 4800 | 34.6 MP |
Scan at 300 to reprint at the same size. Scan at 600 or more to print larger than the original, or to crop into it. The sheet's 1200 is optical; its 9600 is interpolated, which means invented between real samples.
Does DPI matter on a screen or a website?
Almost never. We made the same 1000 x 600 pixel image seven ways and opened each in Chrome 153. Five were shown at their full 1000 pixels, whatever DPI they declared.
| File | DPI | Shown at |
|---|---|---|
| JPEG, no DPI | None | 1000 x 600 |
| JPEG, 300 in JFIF | 300 | 1000 x 600 |
| JPEG, 144 in EXIF | 144 | 1000 x 600 |
| PNG, 144 in pHYs | 144 | 1000 x 600 |
| JPEG, 300 in EXIF, width 1000 | 300 | 1000 x 600 |
| JPEG, 144 in EXIF, width 500 | 144 | 500 x 300 |
| JPEG, 300 in EXIF, width 240 | 300 | 240 x 144 |
The two that shrank carry a second EXIF field, the pixel width in the table, that agrees with their DPI. The HTML standard only honours the DPI when the width times 72, divided by the DPI, equals that field.
The rule exists so that a 2x screenshot, taken on a high density screen, shows at its true size.
A camera writes the photo's real width in that field, so its DPI changes nothing on screen, as the width 1000 row shows. Mozilla's bug tracker lists the same rule as fixed in Firefox 90. We did not test Safari.
So there is nothing to gain by saving a web image at 72. The pixel width is what sets its size on a page.
Why do so many images say 72 DPI?
History, and a default. The first Macintosh screens showed about 72 pixels per inch, matching the 72 points in an inch of type, Wikipedia notes. Windows assumed 96.
Often the file declares nothing at all. We saved a JPEG and a PNG from Chrome's canvas, which browser image tools draw with, this one included. Neither declared a DPI, and macOS reported both as 72.
So a photo that says 72 has usually never been given a DPI. It has exactly the pixels it would have at 300.
What DPI do you actually need?
For a screen, none. For a print, enough pixels: the DPI is only how they are spread. Labs quote 300 as ideal and print from far less; photo print sizes in pixels, and what labs really need has the chart.
When a form asks for 300 DPI, it usually wants that number in the header and a pixel size too. Set both, then check the print size the tool reads out. To size a print in inches first, resize an image in inches.
Last updated: