PDF Compression

JPX Compression: JPEG 2000 (JPXDecode) in PDF

JPX is the PDF filter for JPEG 2000 — a wavelet-based image compression standard that delivers 20–40% better quality than standard JPEG at the same file size, with no blocky artifacts, native transparency support, and progressive resolution loading for massive images.

Quick Answer

Standard JPEG compresses images in 8×8 pixel blocks, producing visible "blockiness" at high compression ratios. JPX (JPEG 2000, PDF filter: JPXDecode) uses discrete wavelet transforms to process entire images at once — producing soft blur instead of blocks at extreme compression, supporting transparency, enabling scalable resolution loading, and handling 16-bit+ color depth. At the same visual quality level, JPX files are typically 20–40% smaller than JPEG. In PDF, JPXDecode was introduced with PDF 1.5 and is now the preferred image format for high-quality archival PDFs.

What Is JPX Compression?

JPX is the PDF specification's name for the JPEG 2000 image format (ISO/IEC 15444). The "X" in JPX stands for "eXtended" — it is a superset of the base JPEG 2000 format that adds additional features for professional and archival use.

Standard JPEG (DCTDecode in PDF) divides an image into 8×8 pixel blocks and compresses each block independently using the Discrete Cosine Transform (DCT). This approach is fast but produces the characteristic "blocky" artifacts at high compression ratios — familiar as the blocky squares that appear in over-compressed web images.

JPX uses an entirely different mathematics: the Discrete Wavelet Transform (DWT). Instead of isolated 8×8 blocks, wavelets analyze the entire image at multiple scales simultaneously, capturing both fine detail and large-scale color gradients in a single mathematical representation. The result is that at extreme compression, the image looks "soft" or "slightly blurry" — far more natural to the eye than blocky pixelation.

📌

PDF 1.5+: JPXDecode was introduced in PDF 1.5 (Acrobat 6, 2003). It is the mandatory image format for PDF/A-3 archival documents that require lossless image storage. All modern PDF viewers support it.

JPX vs. Standard JPEG: Key Differences

FeatureStandard JPEG (DCTDecode)JPX / JPEG 2000 (JPXDecode)
Compression algorithmDCT (8×8 blocks)Discrete Wavelet Transform (whole image)
Artifact type at high compressionVisible square blocksSoft blur (much less objectionable)
Compression efficiencyGood20–40% better at same visual quality
Lossless mode✗ No✓ Yes (reversible DWT)
Transparency (alpha channel)✗ No✓ Yes
Bit depth8-bit (16.7M colors)Up to 32-bit (billions of colors)
Progressive loadingLimited✓ Full resolution scalability
PDF viewer supportUniversalPDF 1.5+ only
Encoding speedFastSlower (more complex math)

Real-World Examples

🎨 Museum Scenario

Digitizing 19th-Century Oil Paintings

A museum digitizes rare paintings for their website and archival PDF catalog. They need researchers to zoom in and see individual cracks in the paint surface. Using JPX compression inside their archival PDFs, they achieve 50% smaller file sizes compared to lossless TIFF while eliminating the blocky JPEG artifacts that would mar the fine texture. At any zoom level, the brushstroke detail is preserved without visible compression.

⚕️ Medical Scenario

X-Ray and MRI Reports

A radiology department embeds diagnostic X-ray images into patient report PDFs. JPX's lossless mode preserves every pixel in the scan — critical because lossy compression could obscure subtle lesions or fractures that determine diagnosis. The lossless files are still 30% smaller than equivalent PNG compression, reducing storage costs while meeting medical imaging standards (DICOM compatibility).

🗺️ GIS Scenario

Satellite Map PDF for Architects

An architect submits a permit application PDF containing a 1 GB satellite photo of the building site. Using JPX with progressive resolution rendering, the city official opens the PDF and immediately sees a low-resolution overview of the entire site. As they zoom into the property boundary, only the specific tile they are viewing is decoded at full resolution — providing lightning-fast performance even with a gigabyte source image.

Why Use JPX in PDF?

🖼️

Superior Image Quality

At equivalent file sizes, JPX produces noticeably better image quality than JPEG — especially visible in smooth gradients and fine textures.

🔍

No Blocky Artifacts

Wavelet compression degrades gracefully — images soften rather than breaking into visible squares, making heavy compression look professional.

🔒

Lossless Mode Available

The reversible DWT option provides mathematically perfect lossless compression — used in medical imaging and archival photography where data integrity is mandatory.

🎨

Transparency Support

JPX natively supports an alpha channel. Images can have see-through regions without using a separate mask, enabling complex transparent image compositions in PDF layouts.

Progressive Resolution Loading

JPX files can be decoded at any resolution level without loading the entire file, enabling instant previews of massive images that decode to full quality only when zoomed in.

🎨

High Bit Depth

Supports 16-bit, 32-bit, and even higher color depth — essential for scientific, medical, and professional color-managed photography workflows.

JPX Within PDF: Technical Specs

In the PDF specification, JPX images are stored as XObject image streams with the /Filter /JPXDecode entry. Unlike most PDF image filters, JPXDecode is special — it is self-describing: the JPX bitstream contains its own color space and bit depth information, and the PDF image dictionary does not need to specify them. This simplifies the PDF structure for JPX images.

PDF IMAGE XOBJECT (JPXDECODE)
7 0 obj                        % Image XObject
<<
  /Type    /XObject
  /Subtype /Image
  /Width   3840
  /Height  2160
  /Filter  /JPXDecode        % JPEG 2000
  /Length  142680
  % No /ColorSpace or /BitsPerComponent needed —
  % JPX bitstream is self-describing
>>
stream
... 142680 bytes of JPEG 2000 data ...
endstream

When to Choose JPX vs. JPEG vs. Flate

Image TypeBest FilterReason
Color photograph (web quality)DCTDecode (JPEG)Faster encoding, universal support
High-end photography / archivalJPXDecode (JPX)Better quality at same size
Medical / scientific (lossless)JPXDecode losslessOnly lossless option for color images
Black & white scanned textJBIG2DecodeMaximum size reduction
Vector graphics, text, fontsFlateDecodeLossless, perfect reproduction

Common Mistakes to Avoid

  • Using JPX for documents read in older software. JPX requires PDF 1.5+. If your audience includes very old PDF processors (pre-2003 software), the images may not render. Use standard JPEG (DCTDecode) for maximum backward compatibility.
  • Expecting JPX to be significantly faster to open than JPEG. Wavelet decoding is more computationally intensive than DCT decoding. While progressive loading helps for very large images, small JPX images may actually open slightly slower than equivalent JPEGs.
  • Not using lossless mode for medical or legal images. JPX's lossy mode can cause subtle quality degradation invisible at normal zoom but detectable in diagnostic zooms. Always use the reversible (lossless) DWT mode for medical, archaeological, forensic, and archival images.
  • Applying JPX to text or vector content. JPX only helps for raster (pixel) images. Applying it to PDF content streams with text or vector drawings produces worse results than FlateDecode. Your PDF generation software should route the right data type to the right filter automatically.
  • Confusing JPX with JPG in file names. Files with a .jpx extension are JPEG 2000 files, not standard JPEGs. Many web browsers do not support JPEG 2000 natively. However, inside a PDF, browsers and PDF viewers decode JPXDecode streams correctly because the PDF viewer handles the decoding, not the browser's image engine.

Frequently Asked Questions

  • JPX (JPXDecode) is the PDF filter for JPEG 2000 — a wavelet-based compression standard for raster images. It achieves 20–40% better quality than standard JPEG at the same file size, produces soft blur instead of blocky artifacts, and supports lossless mode, transparency, and very high bit depths.

  • JPEG (DCTDecode) uses 8×8 block DCT — fast but creates blocky artifacts at high compression. JPX uses wavelet DWT on the whole image — produces soft blur, 20–40% better efficiency, supports transparency and lossless mode, but requires PDF 1.5+.

  • Both. Lossy JPX uses irreversible DWT for maximum size reduction. Lossless JPX uses reversible DWT for exact pixel reproduction — used in medical and archival photography.

  • Use JPX for high-end photography, medical imaging (lossless mode), very large images with progressive loading needs, and images requiring transparency. For maximum compatibility with older software, standard JPEG is still preferable.

  • PDF 1.5 (Acrobat 6, 2003). All modern PDF viewers support it. Very old processors targeting PDF 1.4 or earlier may not.

  • Yes. JPX natively supports an alpha channel (transparency). Standard JPEG cannot. This makes JPX particularly useful for complex PDF designs where images must blend with backgrounds or overlay other elements.

Compress High-Quality PDF Images — Free

PDFlyst optimizes images in your PDFs for the best balance of quality and file size.

Compress PDF — Free