CJB2(1)

NAME
cjb2 - Simple DjVuBitonal encoder.

SYNOPSIS
cjb2 [options] inputfile outputdjvufile

DESCRIPTION
This is a simple encoder for bitonal files. Argument inputfile is the name of a PBM or bitonal TIFF file containing a single document image. This program produces a DjVuBitonal file named outputdjvufile. The default compression process is lossless: decoding the DjVuBitonal file at full resolution will produce an image exactly identical to the input file. Lossy compression is enabled by selecting option -lossy or option -clean.

OPTIONS

-dpi n
    Specify the resolution information encoded into the output file expressed in dots per inch. The resolution information encoded in DjVu files determine how the decoder scales the image on a particular display. Meaningful resolutions range from 25 to 1200. The default resolution for TIFF files is the resolution is the resolution specified by the input file. The default resolution for PBM files is 300 dpi.

-clean
    Remove flyspecks from the input image. This option enables a heuristic algorithm that removes very small marks. Such marks are often causes by noise and dust during the scanning process. The threshold mark size is chosen according to the resolution specified with option -dpi.

-lossy
    Substitute patterns with small variations. This option enables a heuristic algorithm that encodes certain characters by simply replicating the shape of a previously encoded character. This option implies --clean.

-verbose
    Display informational messages while running.

REMARKS
Lossless encoding is competitive with that of the Lizardtech commercial encoders. The performance of the lossy encoding mode was much improved by the new pattern matching code contributed by Ilya Mezhirov. However it still lags behind the performance of commercial encoders. Two notable features are missing:

*   Half-tone detection. Collecting small marks belonging to half-tone patterns would improve compression speed.

*   Multi-page compression. Matching characters on several pages would improve the compression ratios for multi-page documents.

CREDITS
This program was initially written by Léon Bottou <leonb@users.sourceforge.net> and was improved by Bill Riemers <docbill@sourceforge.net> and many others. The pattern matching algorithm for lossy compression was contributed by Ilya Mezhirov <ilya@mezhirov.mccme.ru>.

SEE ALSO
djvu(1), pbm(5).