PeachImage

PeachImage.Formats.Jpeg

JpegEncoderOptions Class

JPEG-specific encode options.

public sealed class JpegEncoderOptions : PeachImage.EncoderOptions

Inheritance System.Object → EncoderOptions → JpegEncoderOptions

Properties  
OptimizeHuffmanTables Whether to compute image-specific optimal Huffman tables via a first frequency-counting pass (ITU-T.81 Annex K.2, libjpeg’s optimize_coding) instead of the fixed Annex K.3 standard tables. Typically saves ~2-6% file size at a given quality, at roughly 2x entropy-coding cost. Defaults to false. Currently only affects baseline (non-progressive) output — progressive AC scans are already always optimized this way regardless of this flag (see PeachImage.Formats.Jpeg.Encoding.ProgressiveScanEncoder).
Progressive Whether to encode as progressive JPEG (multiple, successively refined scans) instead of baseline sequential. Defaults to false.
Quality IJG-style quality, 1 (worst) to 100 (best). Defaults to 75.
RestartInterval The number of MCUs between restart markers, or 0 to disable restart markers.
Subsampling Chroma subsampling ratio. Defaults to 4:2:0, the common web default. Ignored for grayscale sources.