File: minidjvu.1

package info (click to toggle)
minidjvu 0.8.svn.2010.05.06+dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,372 kB
  • ctags: 1,082
  • sloc: sh: 9,230; ansic: 5,788; cpp: 2,400; makefile: 259; python: 42
file content (242 lines) | stat: -rw-r--r-- 6,898 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
.\" Copyright (c) 2005  Ilya Mezhirov
.\" Copyright (c) 2009  Alexey Kryukov
.\" 
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\" 
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\" 
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\" 
.\" You should have received a copy of the GNU General Public
.\" License along with this manual. Otherwise check the web site
.\" of the Free Software Foundation at http://www.fsf.org.
.\" 
.TH "MINIDJVU" "1" "July 2009" "minidjvu-0.8" "minidjvu-0.8"
.SH "NAME"
minidjvu - encode/decode black-and-white DjVu pages

.SH "SYNOPSIS"
.BI "minidjvu  [" "options" "] " "input_file" " " "output_file"

There is a similar syntax for multipage compression:
    
.BI "minidjvu  [" "options" "] " "input_files" " " "output_file"

See
.B "MULTIPAGE ENCODING" 
section below for more details.

.SH "DESCRIPTION"
minidjvu encodes and decodes single-page black-and-white DjVu files.

minidjvu is derived from DjVuLibre, which is the primary support library
for DjVu.

Besides bitonal DjVu, minidjvu understands Windows BMP, PBM and TIFF (through
libtiff) formats.
Both
.I inputfile
and
.I outputfile
may be BMP, PBM, TIFF or DjVu. The file type is determined by extension.
Input and output may coincide.

When given a DjVu-to-DjVu job, minidjvu decodes, then re-encodes the image.
DjVu layers other than bitonal picture are lost.

Specifying a bitmap-to-bitmap job is possible, but relatively useful only with
.BR --smooth
option.

All options preceded by two hyphens can be used with one hyphen.
This is done to make minidjvu interface more familiar for DjVuLibre users.

.SH "MULTIPAGE ENCODING"

To activate the multipage mode either specify in your command line more than
just one input file, or pass to minidjvu a single multipage tiff document. By default (if
.BR --indirect
is not specified) the compressed pages are stored into a single bundled
document under the name provided in the command line.

There are several options referring to the multipage encoding process, namely
.B --pages-per-dict,
.B --indirect
and
.B --report.

.SH "OPTIONS"
.TP
.BI "-A"
.TP 
.BI "--Averaging"
Compute "average" representatives for shapes matching a pattern.

.TP
.BI "-a " "n"
.TP 
.BI "--aggression " "n"
Sets aggression for pattern matching. The more the aggression, the less the
file size, but the more likely substitution errors will occur. The default is
100. Usually you can raise it to about 110 more or less safely. Probably even
200 will work fine, but don't rely on that.

Consistent aggression levels between versions is not guaranteed.
The default, however, will always be 100.

This option turns on
.BR --match
automatically.

.TP
.B "-c"
.TP 
.B "--clean"
Remove small black marks that are probably noise.
This algorithm can really devastate halftone patterns, so use with caution.

This option is turned on by
.BR "--lossy".

.TP 
.BI "-d " "n"
.TP 
.BI "--dpi " "n"
Specify the resolution of an image, measured in dots per inch.
The resolution affects some algorithms and it's recorded in DjVu
and BMP files (TIFF should join someday).

.TP
.B "-e"
.TP 
.B "--erosion"
Sacrifice image quality to gain about 5-10% in file size.
One erosion is almost invisible, but 10 erosions in a row spoil an image badly
(and they won't give you 50-100% of file size, alas).
Erosion bonus stacks with pattern matching.

Erosion makes no sense when the output is not DjVu.

This option is turned on by
.BR "--lossy".

.TP
.B "-i"
.TP 
.B "--indirect"

Specifying this option in multipage mode causes minidjvu to generate an
.I indirect
multipage document, consisting from a single index file, several single-page
DjVu files (one per each image passed to the encoder) and several shared
dictionary files. Note that the index file is created under the name
specified for the output file in the command line, while for each page
the original input file name is preserved, with the extension being
changed to ".djvu".

This mode is useful for placing a large document to a Web server, or if you
are going to postprocess the generated files (e. g. by adding a color
background). In the later case you may then want to convert your indirect
document to DjVu bundled, using the
.B djvmcvt
utility, supplied with DjVuLibre.


.TP 
.B "-l"
.TP 
.B "--lossy"
Turn on all lossy options. Is equivalent to
.BR --clean
.BR --erosion
.BR --match
.BR --smooth.

.TP
.B "-m"
.TP 
.B "--match"
Run pattern matching. This is the main method of shrinking the file size,
but it can also bring trouble with substitution errors. Use
.BR --aggression
option to maintain balance between file size and error probability.

This option is turned on by
.BR "--lossy"
or 
.BR "--aggression".

.TP 
.B "-n"
.TP 
.B "--no-prototypes"
Disable prototype searching. This makes lossless compression faster,
but produced files become much bigger.

.TP 
.B "-p"
.TP 
.B "--pages-per-dict"
Specify how many pages to compress in one pass. The default is 10. If
.BR "-p 0"
is specified, minidjvu will attempt to process all pages at once, but be
aware that this can take a lot of memory, especially on large books.

.TP 
.B "-r"
.TP 
.B "--report"
Print verbose messages about what's done on which page.
Works only with multipage encoding.
Useful only to survive boredom while compressing a book.


.TP 
.B "-s"
.TP 
.B "--smooth"
Flip some pixels that appear to be noise. The gain in file size is about 5%.
Visually the image is slightly improved, but it's hardly noticeable.

Current filter is dumb and only removes black pixels with
at least 3 white neighbors (of 4). You probably won't notice the effects.

This option is turned on by
.BR "--lossy".

.TP 
.B "-v"
.TP 
.B "--verbose"
Print messages about various stages of the process.
It's not very useful, but interesting to examine.

.TP 
.B "-X"
.TP 
.B "--Xtension"
Specifies an extension for shared dictionary files (without a leading
period). The default is "iff".

.TP 
.B "-w"
.TP 
.B "--warnings"
Do not disable libtiff warnings. By default, TIFF warnings are supressed.
Under Windows default TIFF warning handler creates a message box.
This is unacceptable in a batch processing script, for instance.
So the minidjvu default behavior is a workaround for libtiff default behavior.


.SH BUGS

Multipage encoder does not work properly if pages have different resolution.