Contains methods and properties used to write JPEG images.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public sealed class JpegWriter : ImageWriter, IMetadataWriter
JPEG (Joint Photographic Experts Group) is the most popular bitmap image format for storing digital photos using lossy compression. The JPEG format was designed for compressing either grayscale or full-color images of real-world scenes. It supports the sequential and progressive compression schemes, subsampling, and setting a quality range from 0 to 100.
JPEG files can also contain Adobe® resources, XMP, EXIF and IPTC data. However it does not support multiple images in the single file.
JPEG images support three main color spaces:
It does not support indexed images, as well as extended (16 bit per channel) pixel formats.
The following code saves JPEG file with the quality value set to 90, disabled chroma subsampling, and the enabled JPEG progressive technique.
using (var reader = new JpegReader(@"Images\in.jpg")) using (var writer = new JpegWriter(@"Images\Output\out.jpg")) { writer.Quality = 90; writer.UseSubsampling = false; writer.IsProgressive = true; Pipeline.Run(reader + writer); }