JPEG Lossless / Lossy compression
Compress pixel data with JPEG-LS Lossless or lossy JPEG Baseline. JPEG Lossless Process 14 is not supported.
Browser: available nowmacOS app: 1.4.0 or newer
Make a series smaller without changing a single pixel value, for archive or transfer to a system that accepts JPEG-LS. Or, where exact values do not matter, make it much smaller with lossy JPEG Baseline.
Steps
- Open a series with uncompressed pixel data (⌘O).
- Open the command palette (⌘K / Ctrl+K) and run Compress series to JPEG-LS Lossless.
- Wait for the loading indicator to clear. Every instance of the active series is re-encoded.
- In Edit mode, the Transfer Syntax UID (0002,0010) now reads
1.2.840.10008.1.2.4.80. - Save or export the files. Undo (⌘Z) returns the series to its previous encoding.
JPEG Baseline (lossy)
Run Compress series to JPEG Baseline (lossy)… instead. A confirmation dialog
warns that pixel values change for good and asks for a JPEG quality from 50 to 100 (default 90).
Cancel leaves the series as it was. After you confirm, the Transfer Syntax UID reads
1.2.840.10008.1.2.4.50, and each instance is marked lossy (0028,2110 to 0028,2114), set to Image
Type DERIVED and given a new SOP Instance UID.
Limits
- JPEG Lossless Process 14 (
1.2.840.10008.1.2.4.57and.70) is not supported. - JPEG-LS has no signed samples, so signed pixel data (Pixel Representation 1) is refused. Use JPEG 2000 Lossless for it, or HTJ2K Lossless when 8 or fewer bits are stored.
- JPEG-LS writes 16-bit samples with 8 or fewer bits stored at the stored precision. Bits Allocated stays 16.
- JPEG Baseline holds unsigned 8-bit samples only. Images with Bits Allocated 16 or signed data are refused; use lossy JPEG 2000 for them, except signed data with 8 or fewer bits stored, which lossy JPEG 2000 also refuses.
- Bits Allocated must be 8 or 16, and colour data must be 8-bit RGB. YBR colour, 32-bit data and
float data are refused. JPEG Baseline writes colour as
YBR_FULL_422. - Each lossless frame is decoded again after encoding and compared with the source, byte for byte. Each JPEG Baseline frame is decoded again and must reach a PSNR of 30 dB or more against the source. If any frame fails, nothing is changed and a notice says why.
Result
The active series uses JPEG-LS Lossless or JPEG Baseline, one fragment per frame. JPEG-LS decodes to the original stored pixel values; JPEG Baseline decodes to values within the 30 dB PSNR bound.