The CCITTFaxDecode filter: bilevel images coded with the CCITT facsimile schemes, Group 3 one-dimensional (Modified
Huffman), Group 3 two-dimensional (Modified READ) and Group 4 (Modified Modified READ). Decode only.
public sealed class CcittFaxDecodeFilter : IImageFilter, IStreamFilter
ISO 32000-2 §7.4.6, Table 11; ITU-T T.4 §4 (Group 3: code tables, EOL, fill, tag bits, RTC); ITU-T T.6 §2 (Group 4: EOFB). Every
Table 11 parameter is honoured: K (only its sign: the tag bits decide which lines are one-dimensional), EndOfLine,
EncodedByteAlign, Columns, Rows, EndOfBlock, BlackIs1 and DamagedRowsBeforeError. The
output is ceil(Columns / 8) bytes per row, MSB first: 0 is black and 1 white (the PDF convention) unless BlackIs1
is true; the pad bits after the last column are white. As Adobe's decoder does, EOLs are accepted whether or not
EndOfLine asks for them and EOFB/RTC end the data whatever EndOfBlock says; with EndOfBlock false and
Rows given, decoding stops after Rows rows. An image's Height caps the rows decoded.
As an image codec (IImageFilter) it decodes into a 1-component, 1-bit image of the dictionary's Width and
Height: rows are decoded at Columns and cut or padded with white to Width (CcittWidthMismatch), and rows
the data does not reach are white (DecodedRows says how many were decoded). The samples have the
polarity the parameters give them; the image's Decode array maps them, as for any image.
Lenient repair: an invalid code damages its row, which keeps what decoded and is white after (CcittDataInvalid), or is
replaced by the previous row (or a white row after another damaged one) within DamagedRowsBeforeError
(CcittDamagedRowReplaced); decoding resumes at the next EOL, or stops when the data has none. Runs past the last column
are cut (CcittRunTooLong); data that ends inside a row, or before Rows rows, keeps what decoded
(FilterDataTruncated). Uncompressed mode (T.4 Table 5, T.6 Table 4) is decoded, its patterns running on across line ends
as T.6 §2.3.1 says. Invalid parameters take their defaults (DecodeParmsInvalid).
Stateless; each call allocates only its two pooled changing-element arrays, nothing per row.
kind:method, kind:property, kind:ctor. Press Esc to clear.NameGets the name the filter has in a Filter entry, such as FlateDecode: the key it is registered under.Decode(ReadOnlyMemory<Byte>, IBufferWriter<Byte>, FilterContext)Decodes encoded and writes the result to output.DecodeImage(ReadOnlyMemory<Byte>, ImageFilterContext)Decodes the codestream into an image.TryReadHeader(ReadOnlySpan<Byte>, ImageFilterContext, out ImageHeader)Reads the codestream's header without decoding the samples.