1CJB2(1) DjVuLibre-3.5 CJB2(1)
2
3
4
6 cjb2 - Simple DjVuBitonal encoder.
7
8
10 cjb2 [options] inputfile outputdjvufile
11
12
14 This is a simple encoder for bitonal files. Argument inputfile is the
15 name of a PBM or bitonal TIFF file containing a single document image.
16 This program produces a DjVuBitonal file named outputdjvufile.
17
18 The default compression process is lossless: decoding the DjVuBitonal
19 file at full resolution will produce an image exactly identical to the
20 input file. Lossy compression is enabled by options -losslevel,
21 -lossy, or -clean.
22
23
25 -dpi n Specify the resolution information encoded into the output file
26 expressed in dots per inch. The resolution information encoded
27 in DjVu files determine how the decoder scales the image on a
28 particular display. Meaningful resolutions range from 25 to
29 1200. The default resolution for TIFF files is the resolution
30 is the resolution specified by the input file. The default res‐
31 olution for PBM files is 300 dpi.
32
33 -lossless
34 Ensure that the encoded image is pixel-per-pixel equal to the
35 initial image. This option is is equivalent to -losslevel 0 and
36 is the default.
37
38 -clean Only remove flyspecks from the input image. This option enables
39 a heuristic algorithm that removes very small marks. Such marks
40 are often causes by noise and dust during the scanning process.
41 The threshold mark size is chosen according to the resolution
42 specified with option This option is is equivalent to -losslevel
43 1.
44
45 -lossy Substitute patterns with small variations. In addition to the
46 flyspeck removal heuristic, this option enables an algorithm
47 that encodes certain characters by simply replicating the shape
48 of a previously encoded character with a similar shape. This
49 option is is equivalent to -losslevel 100.
50
51 -losslevel x
52 Specify the aggressiveness of the lossy compression. Its argu‐
53 ment ranges from 0 to 200. Higher values generate smaller files
54 with more potential distortions. Loss level 0 corresponds to
55 lossless encoding. Loss level 1 performs image cleaning but
56 does not perform character substitution at all. Loss level 100
57 is intended to provide a good compromise. Higher loss levels
58 provide marginally better compression at the risk of unaccept‐
59 able character substitutions.
60
61 -verbose
62 Display informational messages while running.
63
64
66 Lossless encoding is competitive with that of the Lizardtech commercial
67 encoders.
68
69 Lossy encoding has made much progress thanks to Ilya Mezhirov from the
70 minidjvu project. This also means that the lossy encoding performance
71 can change from version to version. When lossy compression yields
72 inadequate results, simply revert to only using option -clean or reduce
73 the parameter of option -losslevel.
74
75 Two features are still missing:
76
77 * Half-tone detection. Collecting small marks belonging to half-tone
78 patterns would improve compression speed.
79
80 * Multi-page compression. Matching characters on several pages would
81 improve the compression ratios for multi-page documents.
82
83
85 This program was initially written by Léon Bottou <leonb@users.source‐
86 forge.net> and was improved by Bill Riemers <docbill@sourceforge.net>
87 and many others. The pattern matching algorithm for lossy compression
88 was contributed by Ilya Mezhirov <ilya@mezhirov.mccme.ru>. TIFF input
89 routines are inspired by the ones contributed by R. Keith Dennis <den‐
90 nis@rkd.math.cornell.edu> and Paul Young.
91
92
94 djvu(1), pbm(5).
95
96
97
98DjVuLibre-3.5 10/11/2001 CJB2(1)