Jbig2EncodeOptions
How ImageKodec.encodeJbig2 writes a page. Every choice is lossless: it changes the size and the time, never the pixels.
template is the generic region template of ITU-T T.88 6.2.5.3, from 0 to 3, with its nominal adaptive pixels. Template 0 looks at 16 pixels around each one and codes text smallest; 1, 2 and 3 look at 13, 10 and 10 and code faster with fewer contexts to learn.
typicalPrediction (TPGDON, T.88 6.2.5.7) codes a row equal to the row above in one bit. It makes the blank rows of a page nearly free and costs one bit a row elsewhere.
mmr codes the region with T.6 (Group 4) instead of the arithmetic coder. It is faster to read and larger, and it leaves template and typicalPrediction unused.
standalone writes a JBIG2 file (T.88 Annex D, sequential organisation), with its file header and its end-of-page and end-of-file segments. The default is the embedded stream that PDF's
JBIG2Decodefilter takes, which has none of them and needs no global stream.
Throws
if template is outside 0 to 3