Jbig2EncodeOptions

class Jbig2EncodeOptions(val template: Int = 0, val typicalPrediction: Boolean = true, val mmr: Boolean = false, val standalone: Boolean = false)(source)

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 JBIG2Decode filter takes, which has none of them and needs no global stream.

Throws

Constructors

Link copied to clipboard
constructor(template: Int = 0, typicalPrediction: Boolean = true, mmr: Boolean = false, standalone: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String