PeachImage

PeachImage.Formats.Jxl

JxlJpegReconstruction Class

Recovers the original JPEG file from a JPEG XL image that was made by losslessly recompressing one (as cjxl does for JPEG input). The recovered bytes are identical to the JPEG that was recompressed, so they can be embedded or served as-is, without decoding and re-encoding the pixels.

public static class JxlJpegReconstruction

Inheritance System.Object → JxlJpegReconstruction

Remarks

Only files that carry JPEG reconstruction data (a jbrd box) qualify; any other JPEG XL image has to be decoded with Load(Stream, DecoderOptions) instead. Reconstruction reads the whole file.

Methods  
HasJpegReconstructionData(Stream) Whether the JPEG XL file in stream carries JPEG reconstruction data. Returns false for files that are not JPEG XL.
ReconstructJpeg(Stream) Reconstructs the original JPEG file from the JPEG XL file in stream.
ReconstructJpeg(Stream, int, TaskScheduler) Reconstructs the original JPEG file from the JPEG XL file in stream, bounding the threads the call may use.
ReconstructJpeg(Stream, Stream) Reconstructs the original JPEG file from the JPEG XL file in source and writes it to destination.
ReconstructJpeg(Stream, Stream, int, TaskScheduler) Reconstructs the original JPEG file from the JPEG XL file in source and writes it to destination, bounding the threads the call may use.
TryReconstructJpeg(Stream, byte[]) Reconstructs the original JPEG file if the JPEG XL file in stream carries reconstruction data. Returns false (without throwing) for files that are not JPEG XL or were not made from a JPEG.
TryReconstructJpeg(Stream, int, TaskScheduler, byte[]) Like TryReconstructJpeg(Stream, byte[]), bounding the threads the call may use.