File: djvumake.1

package info (click to toggle)
djvulibre 3.5.27.1-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,976 kB
  • ctags: 8,037
  • sloc: cpp: 65,455; xml: 5,723; ansic: 4,640; sh: 846; makefile: 315
file content (246 lines) | stat: -rw-r--r-- 6,048 bytes parent folder | download | duplicates (3)
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
243
244
245
246
.\" t
.\"
.\" Copyright (c) 2001-2003 Leon Bottou, Yann Le Cun, Patrick Haffner,
.\" Copyright (c) 2001 AT&T Corp., and Lizardtech, Inc.
.\"
.\" 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 DJVUMAKE 1 "10/11/2001" "DjVuLibre-3.5" "DjVuLibre-3.5"
.de SS
.SH \\0\\0\\0\\$*
..
.SH NAME
djvumake \- Assemble DjVu image files.

.SH SYNOPSIS
.BI "djvumake " "djvufile" " [" "chkid" "=" "argument" "]..." 

.SH DESCRIPTION
Program
.B djvumake
assembles a single-page DjVu file 
.I djvufile
by copying or creating chunks according to the provided arguments. 
Supported arguments are as follows:
.TP
.BI INFO= w , h , dpi
Create the initial information chunk.  Arguments 
.IR w ", " h ", and " dpi
describe the width, height and resolution of the image.  All arguments
may be omitted.  The default resolution is 300 dpi.  The default width
and height will be retrieved from the first mask chunk specified in the
command line options.
.TP
.BI Sjbz= jb2file
Create a 
.SM JB2 
foreground mask chunk.  File 
.I jb2file
may contain raw JB2 data, 
or be a DjVu file containing JB2 data
such as those produced by program
.BR cjb2 .
.TP
.BI Smmr= mmrfile
Create a
.SM MMR/G4 
foreground mask chunk.  File 
.I mmrfile
may contain raw MMR data or be a DjVu file 
containing MMR data.
.TP
.BI BG44= iw44file "[:" n "]"
Create one or more 
.SM IW44 
background chunks.  File 
.I iw44file 
must contain
.SM IW44 
data.
Such files can be obtained by compressing the background image
with program 
.B c44
and extracting the raw 
.SM IW44 
data using program
.BR djvuextract .
The optional argument
.I n
indicates the number of chunks to copy from the IW44 file.
Omitting the number of chunks copies all available chunks.
.TP
.BI BGjp= jpegfile
Create a 
.SM JPEG
encoded background chunk.
File 
.I jpegfile
must contain 
.SM JPEG 
encoded data.
.TP
.BI BG2k= jpegfile
Create a 
.SM JPEG-2000 
background chunk.
File
.I jpegfile
must contain 
.SM JPEG-2000
encoded data.
The DjVu decoder does not yet display
files containing JPEG-2000 data.
.TP
.BI FGbz=( filename |{# color [: x , y , w , h ]})
Create a foreground color chunk describing one solid
color for each
.SM JB2
encoded mark. 
The argument can be the name
.I filename
of a file containing the raw data.
Such files are best created using program
.BR djvuextract (1).
Alternatively the argument could describe a sequence of color zones.
Each color zone specifies a color name
.IR color ,
and optionally the coordinates
.IR x , y , w , h
of a rectangle.
Each mark receives the color of the last color zone
whose rectangle intersects the bounding box of the mark.
The mark is painted black if its bounding box does not
intersect one of the zones.
The rectangle coordinates are expressed in pixels
with the origin at the bottom left corner of the page.
The full page is assumed when no rectangle 
coordinates are specified.
Color names can be specified with exactly 
six hexadecimal digits, e.g. 
.BR FGbz=#FF8080 ,
or by one of the following sixteen HTML color names 
defined by the W3C, e.g.
.BR FGbz=#red .
.br
.TS
center,box;
lfB lfB lfB lfB
lfB lfB lfB lfB
lfB lfB lfB lfB
lfB lfB lfB lfB
. 
aqua	black	blue	fuchsia
gray	green	lime	maroon
navy	olive	purple	red
silver	teal	white	yellow
.TE
.TP
.BI FG44= iw44file
Create a 
.SM IW44 
foreground color chunk.  
File 
.I iw44file 
must contain 
.SM IW44 
data.
Such files can be obtained by compressing the background image
with command 
.B c44
and extracting the raw 
.SM IW44 
data using program
.BR djvuextract .
Only the first chunk is copied.
.TP
.BI FGjp= jpegfile
Create a 
.SM JPEG
foreground color chunk.
.TP
.BI FG2k= jpegfile
Create a
.SM JPEG-2000
foreground color chunk.
The DjVu decoder does not yet display
files containing JPEG-2000 data.
.TP
.BI INCL= fileid
Create a DjVu3 include chunk pointing to the component file named 
.IR fileid .
The resulting file should then be included into a 
multipage document using command 
.BR djvm .
.TP
.BI Djbz= jb2file
Create a 
.SM JB2 
shape dictionary.  File 
.I jb2file
must contain raw JB2 data
describing a JB2 dictionary.
.TP 
.BI PPM= ppmfile
Create a
.SM IW44
background chunk and a 
.SM IW44 
foreground color chunk 
by masking and subsampling the 
.SM PPM
file
.IR ppmfile.

Assume, for instance, that we have a 
.SM PPM 
image 
.B myimage.ppm
and an identically sized
.SM PBM
bitonal image 
.B mymask.pbm
whose black pixels indicate which pixels belong to the foreground.  
Such a bitonal file might have been obtained by thresholding 
or color-keying the 
.SM PPM 
image. We can then produce a DjVuDocument image using the
following two commands:
.IP "" 3
.B cjb2 mymask.pbm mymask.djvu
.br
.B djvumake my.djvu Sjbz=mymask.djvu PPM=myimage.ppm
.br
.br
.PP
The DjVu specification documents in the directory
.B doc
of the DjVuLibre distribution provide the
authoritative information about the composition 
of a legal DjVu image file.

.SH CREDITS
This program was written by L\('eon Bottou <leonb@users.sourceforge.net> and
was then improved by Andrei Erofeev <andrew_erofeev@yahoo.com>, Bill Riemers
<docbill@sourceforge.net> and many others.

.SH SEE ALSO
.BR djvu (1),
.BR djvuextract (1),
.BR cjb2 (1),
.BR c44 (1)