JpegEncoder

Ecng.Drawing

Managed baseline 8-bit JPEG encoder: YCbCr without chroma subsampling, the quantization tables of the standard scaled by a quality, and Huffman tables built for the picture being written.

Методы

Encode
public static byte[] Encode(RasterImage image, int quality, byte[] profile)
result = JpegEncoder.Encode(image, quality, profile)

Writes a picture as a JPEG. Pixels that are not opaque are shown over white.

image
The picture.
quality
From MinQuality to MaxQuality, on the scale of libjpeg.
profile
The ICC profile the colors of the picture are in; empty if it has none.

Поля

MaxQuality
public const int MaxQuality
value = JpegEncoder.MaxQuality

The highest quality: every coefficient is kept to the nearest whole number.

MinQuality
public const int MinQuality
value = JpegEncoder.MinQuality

The lowest quality: the coarsest quantization.