encodeCcitt
Encode bitmap as CCITT Group 4 fax data (ITU-T T.6), ended with EOFB, as CcittEncodeOptions gives by default. See the overload with options.
Throws
as the overload with options does
Encode bitmap as CCITT fax data (#185): Group 4, or Group 3 one- or two-dimensional, framed as options says. A pixel is black when its luma (BT.601 weights), laid over white by its alpha, is below half, so a transparent pixel is white; the coding of that bilevel page is lossless.
Fax data carries no size or parameters of its own. A PDF image needs /CCITTFaxDecode with /K, /Columns (the width), /Rows (the height) and the flags of options that differ from PDF's defaults; a TIFF needs compression 4, or 3 with T4Options, or 2. CcittFax.decode reads the data back given the same values, and CcittFax.encode takes a packed page.
cancellationCheck, when given, runs every 64 rows and may throw to stop the encode; what it throws comes out of this call as it is.
Throws
if bitmap is wider than 65536 pixels