Inside the PDF specification, image XObjects can be encoded using standard JPEG (/DCTDecode) or JPEG 2000 (/JPXDecode). Here is how these two compression standards differ mathematically.
The Two Primary PDF Image Codecs
- DCTDecode (JPEG): Uses 8x8 block Discrete Cosine Transforms. Fast to encode/decode with universal hardware support.
- JPXDecode (JPEG 2000): Uses Discrete Wavelet Transforms (DWT). Yields 20%–30% higher compression efficiency at equivalent visual quality with support for lossy and lossless modes in a single codec.
DCT Blocking vs Wavelet Softening
At high compression ratios, standard JPEG produces visible 8x8 block grid artifacts (checkerboarding) and mosquito noise around sharp edges. JPEG 2000 degrades gracefully by introducing uniform softness across the image without block discontinuities.
Frequently Asked Questions
Why is standard JPEG still more common than JPEG 2000 in PDFs?
Because standard JPEG requires significantly less CPU memory and decodes 3x–5x faster on mobile devices and legacy hardware.