Debian Codegraph @

doc/minidjvu.1

raw ◀ ▶
1 Debian patch touch this file
1 .\" Copyright (c) 2005 Ilya Mezhirov
2 .\" Copyright (c) 2009 Alexey Kryukov
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual. Otherwise check the web site
21 .\" of the Free Software Foundation at http://www.fsf.org.
22 .\"
23 .TH "MINIDJVU" "1" "July 2009" "minidjvu-0.8" "minidjvu-0.8"
24 .SH "NAME"
25 minidjvu - encode/decode black-and-white DjVu pages
26
27 .SH "SYNOPSIS"
28 .BI "minidjvu [" "options" "] " "input_file" " " "output_file"
29
30 There is a similar syntax for multipage compression:
31
32 .BI "minidjvu [" "options" "] " "input_files" " " "output_file"
33
34 See
35 .B "MULTIPAGE ENCODING"
36 section below for more details.
37
38 .SH "DESCRIPTION"
39 minidjvu encodes and decodes single-page black-and-white DjVu files.
40
41 minidjvu is derived from DjVuLibre, which is the primary support library
42 for DjVu.
43
44 Besides bitonal DjVu, minidjvu understands Windows BMP, PBM and TIFF (through
45 libtiff) formats.
46 Both
47 .I inputfile
48 and
49 .I outputfile
50 may be BMP, PBM, TIFF or DjVu. The file type is determined by extension.
51 Input and output may coincide.
52
53 When given a DjVu-to-DjVu job, minidjvu decodes, then re-encodes the image.
54 DjVu layers other than bitonal picture are lost.
55
56 Specifying a bitmap-to-bitmap job is possible, but relatively useful only with
57 .BR --smooth
58 option.
59
60 All options preceded by two hyphens can be used with one hyphen.
61 This is done to make minidjvu interface more familiar for DjVuLibre users.
62
63 .SH "MULTIPAGE ENCODING"
64
65 To activate the multipage mode either specify in your command line more than
66 just one input file, or pass to minidjvu a single multipage tiff document. By default (if
67 .BR --indirect
68 is not specified) the compressed pages are stored into a single bundled
69 document under the name provided in the command line.
70
71 There are several options referring to the multipage encoding process, namely
72 .B --pages-per-dict,
73 .B --indirect
74 and
75 .B --report.
76
77 .SH "OPTIONS"
78 .TP
79 .BI "-A"
80 .TP
81 .BI "--Averaging"
82 Compute "average" representatives for shapes matching a pattern.
83
84 .TP
85 .BI "-a " "n"
86 .TP
87 .BI "--aggression " "n"
88 Sets aggression for pattern matching. The more the aggression, the less the
89 file size, but the more likely substitution errors will occur. The default is
90 100. Usually you can raise it to about 110 more or less safely. Probably even
91 200 will work fine, but don't rely on that.
92
93 Consistent aggression levels between versions is not guaranteed.
94 The default, however, will always be 100.
95
96 This option turns on
97 .BR --match
98 automatically.
99
100 .TP
101 .B "-c"
102 .TP
103 .B "--clean"
104 Remove small black marks that are probably noise.
105 This algorithm can really devastate halftone patterns, so use with caution.
106
107 This option is turned on by
108 .BR "--lossy".
109
110 .TP
111 .BI "-d " "n"
112 .TP
113 .BI "--dpi " "n"
114 Specify the resolution of an image, measured in dots per inch.
115 The resolution affects some algorithms and it's recorded in DjVu
116 and BMP files (TIFF should join someday).
117
118 .TP
119 .B "-e"
120 .TP
121 .B "--erosion"
122 Sacrifice image quality to gain about 5-10% in file size.
123 One erosion is almost invisible, but 10 erosions in a row spoil an image badly
124 (and they won't give you 50-100% of file size, alas).
125 Erosion bonus stacks with pattern matching.
126
127 Erosion makes no sense when the output is not DjVu.
128
129 This option is turned on by
130 .BR "--lossy".
131
132 .TP
133 .B "-i"
134 .TP
135 .B "--indirect"
136
137 Specifying this option in multipage mode causes minidjvu to generate an
138 .I indirect
139 multipage document, consisting from a single index file, several single-page
140 DjVu files (one per each image passed to the encoder) and several shared
141 dictionary files. Note that the index file is created under the name
142 specified for the output file in the command line, while for each page
143 the original input file name is preserved, with the extension being
144 changed to ".djvu".
145
146 This mode is useful for placing a large document to a Web server, or if you
147 are going to postprocess the generated files (e. g. by adding a color
148 background). In the later case you may then want to convert your indirect
149 document to DjVu bundled, using the
150 .B djvmcvt
151 utility, supplied with DjVuLibre.
152
153
154 .TP
155 .B "-l"
156 .TP
157 .B "--lossy"
158 Turn on all lossy options. Is equivalent to
159 .BR --clean
160 .BR --erosion
161 .BR --match
162 .BR --smooth.
163
164 .TP
165 .B "-m"
166 .TP
167 .B "--match"
168 Run pattern matching. This is the main method of shrinking the file size,
169 but it can also bring trouble with substitution errors. Use
170 .BR --aggression
171 option to maintain balance between file size and error probability.
172
173 This option is turned on by
174 .BR "--lossy"
175 or
176 .BR "--aggression".
177
178 .TP
179 .B "-n"
180 .TP
181 .B "--no-prototypes"
182 Disable prototype searching. This makes lossless compression faster,
183 but produced files become much bigger.
184
185 .TP
186 .B "-p"
187 .TP
188 .B "--pages-per-dict"
189 Specify how many pages to compress in one pass. The default is 10. If
190 .BR "-p 0"
191 is specified, minidjvu will attempt to process all pages at once, but be
192 aware that this can take a lot of memory, especially on large books.
193
194 .TP
195 .B "-r"
196 .TP
197 .B "--report"
198 Print verbose messages about what's done on which page.
199 Works only with multipage encoding.
200 Useful only to survive boredom while compressing a book.
201
202
203 .TP
204 .B "-s"
205 .TP
206 .B "--smooth"
207 Flip some pixels that appear to be noise. The gain in file size is about 5%.
208 Visually the image is slightly improved, but it's hardly noticeable.
209
210 Current filter is dumb and only removes black pixels with
211 at least 3 white neighbors (of 4). You probably won't notice the effects.
212
213 This option is turned on by
214 .BR "--lossy".
215
216 .TP
217 .B "-v"
218 .TP
219 .B "--verbose"
220 Print messages about various stages of the process.
221 It's not very useful, but interesting to examine.
222
223 .TP
224 .B "-X"
225 .TP
226 .B "--Xtension"
227 Specifies an extension for shared dictionary files (without a leading
228 period). The default is "iff".
229
230 .TP
231 .B "-w"
232 .TP
233 .B "--warnings"
•234 Do not disable libtiff warnings. By default, TIFF warnings are suppressed.
235 Under Windows default TIFF warning handler creates a message box.
236 This is unacceptable in a batch processing script, for instance.
237 So the minidjvu default behavior is a workaround for libtiff default behavior.
238
239
240 .SH BUGS
241
242 Multipage encoder does not work properly if pages have different resolution.