Chapter 35: Resolution, formats and units
Every image is measured twice: in units software counts, such as pixels and points, and at the size a person finally sees. Resolution, formats and units are the arithmetic between the two. Get them wrong and you get a pixelated poster or a four-megabyte photo that holds up a page.
Resolution and pixel density
Resolution, for a raster image (→ 12 Digital drawing and illustration tools), is its pixel dimensions: 4,000 × 3,000 pixels, or 12 megapixels. It says how much detail the file holds and nothing about how big it will look. Pixel density is how closely pixels are packed on a display or a print, in pixels per inch. In 2010 Apple put 960 × 640 pixels on the iPhone 4’s 3.5-inch screen, 326 ppi, and called it a Retina display, claiming the eye couldn’t pick out individual pixels at a normal distance.1
The device pixel ratio is the number of physical pixels per CSS pixel: 1 on a classic 96 ppi monitor, 2 on most high-density screens, and often more on phones.2 An image slot 320 CSS pixels wide therefore needs a 640-pixel file to look sharp at 2×, and the HTML srcset attribute lets the browser pick the right file for the screen.3 Vector art avoids the problem.
PPI and DPI
PPI (pixels per inch) is the density of pixels in an image or on a display. DPI (dots per inch) is the density of the dots a printer lays down. They differ because presses and laser printers can’t print a pixel’s color directly. They fake continuous tone with halftone dots (→ 15 Color in screen and print), each built from a grid of much smaller laser spots. Wayne Collins gives the arithmetic: a platesetter fires 2,000 to 3,000 spots per inch, so cells 10 spots square make a halftone screen of 200 to 300 lines per inch (lpi).4 His working rule is required ppi = 2 × lpi at final size. A job printed at 150 lpi needs images at 300 ppi, the figure most printers ask for (→ 38 Prepress and printing).4
The ppi number stored in an image file is only an instruction about print size. Adobe’s Photoshop documentation says that unless you resample, the pixel data stays the same: raising the resolution shrinks the printed width and height in proportion.5 On screen only the pixel dimensions count.
The habit of saving web images at “72 dpi” comes from the 1984 Macintosh, whose 512 × 342 screen ran at 72 ppi, by common account so that one pixel matched one point. Windows reported its screens as 96 ppi instead, enlarging type by about a third to allow for viewing distance.6
Lossy and lossless compression
Lossless compression shrinks a file in a way that can be reversed exactly, bit for bit; PNG does it with the Deflate method.7 Lossy compression discards detail the eye is less likely to miss, so it shrinks photographs much further. JPEG, standardized in 1992 as ITU-T T.81, is the familiar example.8 It fails on screenshots, line art and text, where MDN notes that blurring and colored fringes around sharp edges are very visible.9
Each time a JPEG is opened, edited and saved, it’s encoded again. Jon Sneyers showed in 2016 that this generation loss harms an image more than the quality setting itself, and that re-saving at a higher quality than the original never wins detail back.10 Keep a lossless master (a raw, TIFF or layered file) and export lossy copies from it.

Michael Gäbler (photograph), derivative work by AzaToth, CC BY 3.0, via Wikimedia Commons.
Image formats
| Format | Compression | Transparency | Use it for |
|---|---|---|---|
| JPEG | Lossy | No | Photographs where support matters most, such as email |
| PNG | Lossless | Yes | Screenshots, interface graphics, images with text |
| WebP | Lossy or lossless | Yes | Photographs and graphics on the web |
| AVIF | Lossy or lossless | Yes | Photographs on the web at the smallest size |
| SVG | None (vector text) | Yes | Logos, icons, diagrams |
| TIFF | Usually lossless | Rarely used | Print masters and archives |
| Varies by content | Yes | Print handoff and fixed documents |
Google released WebP in 2010.11 Its own figures put lossless WebP 26% smaller than PNG and lossy WebP 25 to 34% smaller than JPEG at equal quality.12 AVIF, which the Alliance for Open Media published in February 2019, stores images compressed with the AV1 video codec.13 MDN’s advice for raster images on the web is to prefer WebP or AVIF, with a JPEG or PNG fallback in a <picture> element.9
SVG, a W3C Recommendation since September 4, 2001, describes two-dimensional graphics in XML.14 It’s text, so it scales cleanly and can be styled with CSS (→ 74 HTML and CSS). TIFF began at Aldus, with Microsoft, in 1986 and is now controlled by Adobe.15 Safari is the only browser that displays it, so it belongs in print and archive work.9 PDF began at Adobe in the early 1990s and became an ISO standard, ISO 32000-1, in 2008.16 It holds vectors, images and fonts together on fixed pages; printers ask for its PDF/X form (→ 38 Prepress and printing).
Units for print and screen
Print uses millimeters (inches in North America) for paper and margins, and points and picas for type (→ 19 Setting text). CSS fixes the ratios between its absolute units: 1 in = 2.54 cm = 96 px, and 1 pt = 1/72 in, so 12 pt equals 16 px.17 The CSS px is a reference pixel, the visual angle of one pixel on a 96 ppi screen at arm’s length, about 0.0213 degrees. The specification warns that physical units then may not match reality: a CSS centimeter on a phone is seldom a centimeter.17
The rem is the font size of the page’s root element. Browsers usually default it to 16 px, but readers can change that, and MDN warns that font sizes in px can stop people with low vision from enlarging text.18 Set type and spacing in rem, and keep px for hairlines and borders (→ 21 Typography on screens).
Native platforms have their own units. Apple’s point maps to one, two or three pixels depending on the screen.19 Android’s density-independent pixel (dp) equals one pixel at 160 dpi, so px = dp × (dpi ÷ 160). Its sp unit, for text, also follows the user’s text-size setting.20
See also
12 Digital drawing and illustration tools · 15 Color in screen and print · 19 Setting text · 21 Typography on screens · 38 Prepress and printing · 67 Responsive, mobile-first and cross-device design
Sources
- Adobe (2026). “Printed image resolution.” Photoshop User Guide.
- Alliance for Open Media (2019). AV1 Image File Format (AVIF), v1.0.0.
- Android Developers (n.d.). “Support different pixel densities.”
- Apple (2010). “Apple Presents iPhone 4.” Press release, June 7.
- Apple (n.d.). “Images.” Human Interface Guidelines.
- Collins, W. (2015). “Raster Image Processing.” In Graphic Design and Print Production Fundamentals. BCcampus.
- Google (2010). “WebP, a new image format for the Web.” Chromium Blog; Google for Developers, “An image format for the Web.”
- ITU-T (1992). Recommendation T.81 (JPEG).
- Library of Congress (n.d.). Sustainability of Digital Formats: TIFF 6.0; PDF family.
- MDN Web Docs (n.d.). “devicePixelRatio”; “Using responsive images in HTML”; “Image file type and format guide”; “font-size.” Mozilla.
- Microsoft Typography (2005). “Where does 96 DPI come from in Windows?” Fontblog.
- Sneyers, J. (2016). “Why JPEG is like a photocopier.” Cloudinary.
- W3C (2001). SVG 1.0 Specification.
- W3C (2025). PNG Specification, third edition.
- W3C (n.d.). CSS Values and Units Module Level 4.
Notes
- Apple (2010, June 7). “Apple Presents iPhone 4.” Press release. https://www.apple.com/newsroom/2010/06/07Apple-Presents-iPhone-4/ ↩
- MDN Web Docs (n.d.). “Window: devicePixelRatio property.” https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio ↩
- MDN Web Docs (n.d.). “Using responsive images in HTML.” https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Responsive_images ↩
- Collins, W. (2015). “5.2 Raster Image Processing.” In Graphic Design and Print Production Fundamentals. BCcampus, CC BY 4.0. https://opentextbc.ca/graphicdesign/chapter/5-2-raster-image-processing/ ↩ ↩
- Adobe (2026). “Printed image resolution.” Photoshop User Guide. https://helpx.adobe.com/photoshop/desktop/crop-resize-transform/resize-adjust-resolution/printed-image-resolution.html ↩
- Microsoft Typography (2005, November 8). “Where does 96 DPI come from in Windows?” Fontblog, archived on Microsoft Learn. https://learn.microsoft.com/en-us/archive/blogs/fontblog/where-does-96-dpi-come-from-in-windows ↩
- W3C (2025). Portable Network Graphics (PNG) Specification, third edition. https://www.w3.org/TR/png-3/ ↩
- ITU-T (1992). Recommendation T.81, Digital compression and coding of continuous-tone still images. https://www.itu.int/rec/T-REC-T.81-199209-I/en ↩
- MDN Web Docs (n.d.). “Image file type and format guide.” https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types ↩ ↩ ↩
- Sneyers, J. (2016, May 4). “Why JPEG is like a photocopier.” Cloudinary blog. https://cloudinary.com/blog/why_jpeg_is_like_a_photocopier ↩
- Google (2010, September 30). “WebP, a new image format for the Web.” Chromium Blog. https://blog.chromium.org/2010/09/webp-new-image-format-for-web.html ↩
- Google for Developers (n.d.). “An image format for the Web.” https://developers.google.com/speed/webp ↩
- Alliance for Open Media (2019). AV1 Image File Format (AVIF), v1.0.0, 19 February 2019. https://aomediacodec.github.io/av1-avif/v1.0.0.html ↩
- W3C (2001). Scalable Vector Graphics (SVG) 1.0 Specification. W3C Recommendation, 4 September 2001. https://www.w3.org/TR/2001/REC-SVG-20010904/ ↩
- Library of Congress (n.d.). “TIFF, Revision 6.0.” Sustainability of Digital Formats. https://www.loc.gov/preservation/digital/formats/fdd/fdd000022.shtml ↩
- Library of Congress (n.d.). “PDF (Portable Document Format) Family.” Sustainability of Digital Formats. https://www.loc.gov/preservation/digital/formats/fdd/fdd000030.shtml ↩
- W3C (n.d.). CSS Values and Units Module Level 4, section 6.2, “Absolute lengths.” https://www.w3.org/TR/css-values-4/ ↩ ↩
- MDN Web Docs (n.d.). “font-size.” https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/font-size ↩
- Apple (n.d.). “Images.” Human Interface Guidelines. https://developer.apple.com/design/human-interface-guidelines/images ↩
- Android Developers (n.d.). “Support different pixel densities.” https://developer.android.com/training/multiscreen/screendensities ↩