Understanding JPEG Quality Values

What JPEG quality numbers mean, how they affect file size and visual fidelity, and which values PulpPDF uses.

How JPEG Quality Works

JPEG is a lossy compression format. The quality value (0-100) controls how much detail is discarded during encoding:

  • Higher quality = less data discarded = larger file = sharper image
  • Lower quality = more data discarded = smaller file = more artifacts

The relationship between quality and file size is not linear. Going from 95 to 85 often halves the file size with barely visible difference. Going from 40 to 30 saves much less proportionally.

Quality Levels

Quality Visual result Relative size PulpPDF preset
95-100 Virtually lossless 100% (baseline)
85 Excellent — no visible difference at 100% zoom ~50% High Quality
60 Good — minor softening visible at 200%+ zoom ~25% Balanced
40 Acceptable — visible softening, blocking on gradients ~15% Ultra
35 Noticeable — text still readable, photos degraded ~12% Maximum
10-20 Poor — heavy blocking, color banding ~5%

What Artifacts Look Like

JPEG compression artifacts appear as:

  • Blocking — visible 8x8 pixel grid pattern, especially in flat color areas
  • Ringing — halos around sharp edges (text, lines)
  • Color banding — smooth gradients become stepped
  • Mosquito noise — shimmering artifacts near high-contrast edges

These artifacts become more pronounced at lower quality values and are most visible in:

  • Solid color backgrounds
  • Smooth gradients
  • Areas around sharp text edges
  • High-contrast boundaries

Text vs Photos

Text and line art suffer more from JPEG compression than photographs. Photos naturally contain noise and variation that masks artifacts. Text has sharp, high-contrast edges where artifacts are immediately visible.

This is why PulpPDF's standard presets (which recompress only embedded images) preserve text quality — text stays as vector outlines, untouched by JPEG compression. Only the Ultra preset rasterizes text into images.

Diminishing Returns

Re-compressing an already-compressed JPEG adds artifacts without proportional size savings. PulpPDF handles this by comparing the original and recompressed image sizes — if the new version isn't smaller, the original is kept.