Jbig2DecodeFilter Class

Definition

The JBIG2Decode filter: bitonal images coded with JBIG2 (ITU-T T.88 | ISO/IEC 14492) in the embedded organisation PDF uses, with the global segments in the JBIG2Globals stream. Decode only.

public sealed class Jbig2DecodeFilter : IImageFilter, IStreamFilter

Remarks

ISO 32000-2 §7.4.7 and Table 12; ITU-T T.88 §6.2 (generic regions: the four templates, AT pixels, typical prediction, MMR), §6.3 (generic refinement, both templates, TPGR), §6.4 (text regions, every reference corner, transposed, refined instances), §6.5 (symbol dictionaries: direct, refinement/aggregate, Huffman collective bitmaps, context reuse), §6.6 and §6.7 (halftone regions and pattern dictionaries, Annex C gray-scale planes), §7 (segment headers and syntaxes), §8 (page make-up with intermediate regions and auxiliary buffers), Annex A (arithmetic integer decoding), Annex B (standard and custom Huffman tables), Annex D.3 (embedded organisation) and Annex E (the MQ arithmetic decoder, shared with JPXDecode). The global segments are decoded first (once per JBIG2Globals stream), then the image stream's page 1 segments; the page is the image's Width x Height (else the page information size), filled with the page's default pixel, and regions are combined into it.

Output: one 1-bit component, ceil(Width / 8) bytes per row, in PDF polarity: JBIG2's black (1) becomes 0, as a 1-bit DeviceGray sample or a painting image-mask sample reads it (§8.9.5.2, §8.9.6.2), and the bits after the last column are 0. The image's Decode array applies as for any image (SamplesInverted is false).

Not decoded: extended templates (Amendment 2) and colour (Amendment 3, forbidden by §7.4.7), reported as Jbig2UnsupportedFeature (Information) with the image not decoded. Lenient repair: a file header, end-of-page and end-of-file segments, segments of other pages, truncated segments, missing referred segments, damaged Huffman or arithmetic data and a page size that disagrees with the image are tolerated with a diagnostic; strict mode throws instead.

Thread-safe; decoded globals are cached per stream (immutable). A decode allocates per stream, per region and per symbol, nothing per row, pixel, symbol instance or halftone cell.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (1)

Methods (3)