Lossless JPEG Transcoding¶
Overview¶
JPEG XL can preserve the original JPEG while reducing its file size by 16% - 22% [1] .
This process is reversible - you can reconstruct the original JPEG image with an identical checksum.
Lossless JPEG Transcoding¶
To transcode a JPEG image into JPEG XL image:
Add JPEG images
Select “Lossless JPEG Transcoding” from the format selector
Convert
JPEG Reconstruction¶
To reverse the recompression and get the original JPEG image:
Add JPEG XL images (with jxl extension)
Select “JPEG Reconstruction” from the format selector
Convert
Options¶
Lossless JPEG Transcoding¶
- Effort
Increasing Effort in this case always reduces file size and slow down the transcoding. Effort 9 offers the smallest file size.
- Verify
Validates that a JPEG image can be reconstructed, and its checksum matches the original. An exception will be displayed if any problems occur.
Enabling this option is unnecessary because the transcoding is highly reliable. However, it does provide an additional reassurance.
If “Normalize” is enabled, the checksum of the normalized image will be used instead.
Images will take slightly longer to process if enabled.
- Normalize
Allows for transcoding problematic JPEG images. Rewrites image structure without affecting quality or metadata.
Discards unnecessary information, such as unused quantization tables or arbitrary tail data.
Important
With this enabled, the checksum of a JPEG image you can reconstruct will change, and its file size will increase.
Equivalent to
jpegtran -copy all -optimize
. Images will take slightly longer to process if enabled.
JPEG Reconstruction¶
- PNG Fallback
Disabled: an exception will be raised if reconstruction data is not found.
Enabled: image will be decoded to PNG if there is no reconstruction data.
Metadata¶
In the aforementioned modes, metadata will always be preserved regardless of settings. Preserving Date & Time works as usual.
Lossless Compression vs Lossless JPEG Transcoding¶
There is a major difference between the two:
Lossless Compression - standard lossless compression.
Lossless JPEG Transcoding (or Recompression) - a specific type of lossless compression for compressing JPEG images specifically.
Only the standard compression is applied in when “JPEG XL” format is selected. This is done for privacy reasons as recompression requires metadata preservation.
While this behavior can be changed, you should use dedicated mode for this. Namely:
Lossless JPEG Transcoding
JPEG Reconstruction
The performance of these modes is uncapped because the RAM required for those operations is tiny. They also offer safeguard, extra features, and avoid non-standard behavior.