JpegWriter Class

Contains methods and properties used to write JPEG images.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public sealed class JpegWriter : ImageWriter, IMetadataWriter

Remarks

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:

  • RGB;
  • CMYK;
  • Grayscale;

It does not support indexed images, as well as extended (16 bit per channel) pixel formats.

Examples

The following code saves JPEG file with the quality value set to 90, disabled chroma subsampling, and the enabled JPEG progressive technique.

C#
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);
}

Inheritance Hierarchy

System.Object

Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also

Reference

Manual