JpegCodec

Ecng.Drawing

Managed JPEG decoder dispatch for sequential, progressive, arithmetic and lossless frames. Sequential Huffman frames can be decoded at a reduced DCT scale for thumbnails.

Methods

Decode
public static RasterImage Decode(byte[] data)
result = JpegCodec.Decode(data)

Decodes the picture and turns it the way its Exif orientation asks for it to be shown.

ReadSize
public static ValueTuple<int, int> ReadSize(ReadOnlySpan<byte> data)
result = JpegCodec.ReadSize(data)

Reads the size the picture is shown with: the one in the frame header, turned if the Exif orientation says so.