Aerial imagery codec comparison
2048×2048 centre crop, 7.5 cm LINZ imagery.
What stands out (all 6 examples)
- JPEG XL lossless is 8–13% smaller than LINZ's lossless WebP, with bit-identical pixels. That saving needs no quality trade-off at all.
- Near-lossless JPEG XL (d=0.5) is 3–4× smaller than LINZ's files (25–31% of the size), at 44–46.5 dB PSNR and SSIM ≥ 0.986, well above the ≈40 dB visually-lossless line.
- JPEG XL d=1 is 5–7× smaller (14–20% of LINZ's size) and still 41–44 dB. It beats JPEG q=90 on both counts: smaller files (JPEG needs 17–28%) and higher PSNR (JPEG gets 40–43 dB).
What stands out (all 6 examples)
- JPEG XL lossless is 32–41% smaller than LINZ's ZSTD TIFF.
- JPEG XL d=0.5 is 3–5× smaller than LINZ (21–31% of the size), with NIR still at 46–48 dB PSNR.
- At the same file size, JPEG XL beats JPEG on every band: +2.4 to +3.2 dB PSNR on RGB, but only +0.1 to +3.0 dB on NIR (usually about +1 dB). The NIR margin is smaller because JPEG XL codes NIR as an extra channel with modular coding, which is less efficient than the VarDCT it uses for colour.
- Only JPEG XL is practical. 5-band JPEG is valid ITU T.81, but libjpeg-turbo, and so Pillow, OpenCV and GDAL, will not decode it.
How the 5 bands were encoded
- AVIF, WebP and JPEG AI hold at most RGB + alpha, so they are not in this view.
- JPEG XL: NIR is a named extra channel at the same distance as the colour; alpha is lossless.
- JPEG: Y/Cb/Cr 4:2:0 in one scan, then NIR and alpha in scans of their own (a scan holds at most 4 components).
- The original is the same crop saved like LINZ's files: TIFF, ZSTD, horizontal predictor.
- The difference pane compares whichever Display is selected.
Difference![Difference image]()
Computing difference…
Scroll to zoom, drag to pan; all panes stay in sync. The difference pane shows |left − right| per pixel (largest channel), multiplied by the gain: black means identical, bright means different. Click a table row to put it on the right; shift-click puts it on the left.
Quality vs file size
Higher and further left is better: more quality for fewer bytes. Lossless versions are not plotted because their PSNR is infinite. Hover a point for details; click it to put it in the right pane.
Results
Imagery sourced from the LINZ Data Service and licensed for reuse under the CC BY 4.0 licence. Supplied by Toitū Te Whenua Land Information New Zealand, Aerial Surveys, Wellington City Council, Porirua City Council and CoLAB. Images have been cropped and re-encoded for this comparison.