Blame tools/djvumake.1

Packit df99a1
.\" Copyright (c) 2001-2003 Leon Bottou, Yann Le Cun, Patrick Haffner,
Packit df99a1
.\" Copyright (c) 2001 AT&T Corp., and Lizardtech, Inc.
Packit df99a1
.\"
Packit df99a1
.\" This is free documentation; you can redistribute it and/or
Packit df99a1
.\" modify it under the terms of the GNU General Public License as
Packit df99a1
.\" published by the Free Software Foundation; either version 2 of
Packit df99a1
.\" the License, or (at your option) any later version.
Packit df99a1
.\"
Packit df99a1
.\" The GNU General Public License's references to "object code"
Packit df99a1
.\" and "executables" are to be interpreted as the output of any
Packit df99a1
.\" document formatting or typesetting system, including
Packit df99a1
.\" intermediate and printed output.
Packit df99a1
.\"
Packit df99a1
.\" This manual is distributed in the hope that it will be useful,
Packit df99a1
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit df99a1
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit df99a1
.\" GNU General Public License for more details.
Packit df99a1
.\"
Packit df99a1
.\" You should have received a copy of the GNU General Public
Packit df99a1
.\" License along with this manual. Otherwise check the web site
Packit df99a1
.\" of the Free Software Foundation at http://www.fsf.org.
Packit df99a1
.TH DJVUMAKE 1 "10/11/2001" "DjVuLibre-3.5" "DjVuLibre-3.5"
Packit df99a1
.de SS
Packit df99a1
.SH \\0\\0\\0\\$*
Packit df99a1
..
Packit df99a1
.SH NAME
Packit df99a1
djvumake \- Assemble DjVu image files.
Packit df99a1
Packit df99a1
.SH SYNOPSIS
Packit df99a1
.BI "djvumake " "djvufile" " [" "chkid" "=" "argument" "]..." 
Packit df99a1
Packit df99a1
.SH DESCRIPTION
Packit df99a1
Program
Packit df99a1
.B djvumake
Packit df99a1
assembles a single-page DjVu file 
Packit df99a1
.I djvufile
Packit df99a1
by copying or creating chunks according to the provided arguments. 
Packit df99a1
Supported arguments are as follows:
Packit df99a1
.TP
Packit df99a1
.BI INFO= w , h , dpi
Packit df99a1
Create the initial information chunk.  Arguments 
Packit df99a1
.IR w ", " h ", and " dpi
Packit df99a1
describe the width, height and resolution of the image.  All arguments
Packit df99a1
may be omitted.  The default resolution is 300 dpi.  The default width
Packit df99a1
and height will be retrieved from the first mask chunk specified in the
Packit df99a1
command line options.
Packit df99a1
.TP
Packit df99a1
.BI Sjbz= jb2file
Packit df99a1
Create a 
Packit df99a1
.SM JB2 
Packit df99a1
foreground mask chunk.  File 
Packit df99a1
.I jb2file
Packit df99a1
may contain raw JB2 data, 
Packit df99a1
or be a DjVu file containing JB2 data
Packit df99a1
such as those produced by program
Packit df99a1
.BR cjb2 .
Packit df99a1
.TP
Packit df99a1
.BI Smmr= mmrfile
Packit df99a1
Create a
Packit df99a1
.SM MMR/G4 
Packit df99a1
foreground mask chunk.  File 
Packit df99a1
.I mmrfile
Packit df99a1
may contain raw MMR data or be a DjVu file 
Packit df99a1
containing MMR data.
Packit df99a1
.TP
Packit df99a1
.BI BG44= iw44file "[:" n "]"
Packit df99a1
Create one or more 
Packit df99a1
.SM IW44 
Packit df99a1
background chunks.  File 
Packit df99a1
.I iw44file 
Packit df99a1
must contain
Packit df99a1
.SM IW44 
Packit df99a1
data.
Packit df99a1
Such files can be obtained by compressing the background image
Packit df99a1
with program 
Packit df99a1
.B c44
Packit df99a1
and extracting the raw 
Packit df99a1
.SM IW44 
Packit df99a1
data using program
Packit df99a1
.BR djvuextract .
Packit df99a1
The optional argument
Packit df99a1
.I n
Packit df99a1
indicates the number of chunks to copy from the IW44 file.
Packit df99a1
Omitting the number of chunks copies all available chunks.
Packit df99a1
.TP
Packit df99a1
.BI BGjp= jpegfile
Packit df99a1
Create a 
Packit df99a1
.SM JPEG
Packit df99a1
encoded background chunk.
Packit df99a1
File 
Packit df99a1
.I jpegfile
Packit df99a1
must contain 
Packit df99a1
.SM JPEG 
Packit df99a1
encoded data.
Packit df99a1
.TP
Packit df99a1
.BI BG2k= jpegfile
Packit df99a1
Create a 
Packit df99a1
.SM JPEG-2000 
Packit df99a1
background chunk.
Packit df99a1
File
Packit df99a1
.I jpegfile
Packit df99a1
must contain 
Packit df99a1
.SM JPEG-2000
Packit df99a1
encoded data.
Packit df99a1
The DjVu decoder does not yet display
Packit df99a1
files containing JPEG-2000 data.
Packit df99a1
.TP
Packit df99a1
.BI FGbz=( filename |{# color [: x , y , w , h ]})
Packit df99a1
Create a foreground color chunk describing one solid
Packit df99a1
color for each
Packit df99a1
.SM JB2
Packit df99a1
encoded mark. 
Packit df99a1
The argument can be the name
Packit df99a1
.I filename
Packit df99a1
of a file containing the raw data.
Packit df99a1
Such files are best created using program
Packit df99a1
.BR djvuextract (1).
Packit df99a1
Alternatively the argument could describe a sequence of color zones.
Packit df99a1
Each color zone specifies a color name
Packit df99a1
.IR color ,
Packit df99a1
and optionally the coordinates
Packit df99a1
.IR x , y , w , h
Packit df99a1
of a rectangle.
Packit df99a1
Each mark receives the color of the last color zone
Packit df99a1
whose rectangle intersects the bounding box of the mark.
Packit df99a1
The mark is painted black if its bounding box does not
Packit df99a1
intersect one of the zones.
Packit df99a1
The rectangle coordinates are expressed in pixels
Packit df99a1
with the origin at the bottom left corner of the page.
Packit df99a1
The full page is assumed when no rectangle 
Packit df99a1
coordinates are specified.
Packit df99a1
Color names can be specified with exactly 
Packit df99a1
six hexadecimal digits, e.g. 
Packit df99a1
.BR FGbz=#FF8080 ,
Packit df99a1
or by one of the following sixteen HTML color names 
Packit df99a1
defined by the W3C, e.g.
Packit df99a1
.BR FGbz=#red .
Packit df99a1
.br
Packit df99a1
.TS
Packit df99a1
center,box;
Packit df99a1
lfB lfB lfB lfB
Packit df99a1
lfB lfB lfB lfB
Packit df99a1
lfB lfB lfB lfB
Packit df99a1
lfB lfB lfB lfB
Packit df99a1
. 
Packit df99a1
aqua	black	blue	fuchsia
Packit df99a1
gray	green	lime	maroon
Packit df99a1
navy	olive	purple	red
Packit df99a1
silver	teal	white	yellow
Packit df99a1
.TE
Packit df99a1
.TP
Packit df99a1
.BI FG44= iw44file
Packit df99a1
Create a 
Packit df99a1
.SM IW44 
Packit df99a1
foreground color chunk.  
Packit df99a1
File 
Packit df99a1
.I iw44file 
Packit df99a1
must contain 
Packit df99a1
.SM IW44 
Packit df99a1
data.
Packit df99a1
Such files can be obtained by compressing the background image
Packit df99a1
with command 
Packit df99a1
.B c44
Packit df99a1
and extracting the raw 
Packit df99a1
.SM IW44 
Packit df99a1
data using program
Packit df99a1
.BR djvuextract .
Packit df99a1
Only the first chunk is copied.
Packit df99a1
.TP
Packit df99a1
.BI FGjp= jpegfile
Packit df99a1
Create a 
Packit df99a1
.SM JPEG
Packit df99a1
foreground color chunk.
Packit df99a1
.TP
Packit df99a1
.BI FG2k= jpegfile
Packit df99a1
Create a
Packit df99a1
.SM JPEG-2000
Packit df99a1
foreground color chunk.
Packit df99a1
The DjVu decoder does not yet display
Packit df99a1
files containing JPEG-2000 data.
Packit df99a1
.TP
Packit df99a1
.BI INCL= fileid
Packit df99a1
Create a DjVu3 include chunk pointing to the component file named 
Packit df99a1
.IR fileid .
Packit df99a1
The resulting file should then be included into a 
Packit df99a1
multipage document using command 
Packit df99a1
.BR djvm .
Packit df99a1
.TP
Packit df99a1
.BI Djbz= jb2file
Packit df99a1
Create a 
Packit df99a1
.SM JB2 
Packit df99a1
shape dictionary.  File 
Packit df99a1
.I jb2file
Packit df99a1
must contain raw JB2 data
Packit df99a1
describing a JB2 dictionary.
Packit df99a1
.TP 
Packit df99a1
.BI PPM= ppmfile
Packit df99a1
Create a
Packit df99a1
.SM IW44
Packit df99a1
background chunk and a 
Packit df99a1
.SM IW44 
Packit df99a1
foreground color chunk 
Packit df99a1
by masking and subsampling the 
Packit df99a1
.SM PPM
Packit df99a1
file
Packit df99a1
.IR ppmfile.
Packit df99a1
Packit df99a1
Assume, for instance, that we have a 
Packit df99a1
.SM PPM 
Packit df99a1
image 
Packit df99a1
.B myimage.ppm
Packit df99a1
and an identically sized
Packit df99a1
.SM PBM
Packit df99a1
bitonal image 
Packit df99a1
.B mymask.pbm
Packit df99a1
whose black pixels indicate which pixels belong to the foreground.  
Packit df99a1
Such a bitonal file might have been obtained by thresholding 
Packit df99a1
or color-keying the 
Packit df99a1
.SM PPM 
Packit df99a1
image. We can then produce a DjVuDocument image using the
Packit df99a1
following two commands:
Packit df99a1
.IP "" 3
Packit df99a1
.B cjb2 mymask.pbm mymask.djvu
Packit df99a1
.br
Packit df99a1
.B djvumake my.djvu Sjbz=mymask.djvu PPM=myimage.ppm
Packit df99a1
.br
Packit df99a1
.br
Packit df99a1
.PP
Packit df99a1
The DjVu specification documents in the directory
Packit df99a1
.B doc
Packit df99a1
of the DjVuLibre distribution provide the
Packit df99a1
authoritative information about the composition 
Packit df99a1
of a legal DjVu image file.
Packit df99a1
Packit df99a1
.SH CREDITS
Packit df99a1
This program was written by L\('eon Bottou <leonb@users.sourceforge.net> and
Packit df99a1
was then improved by Andrei Erofeev <andrew_erofeev@yahoo.com>, Bill Riemers
Packit df99a1
<docbill@sourceforge.net> and many others.
Packit df99a1
Packit df99a1
.SH SEE ALSO
Packit df99a1
.BR djvu (1),
Packit df99a1
.BR djvuextract (1),
Packit df99a1
.BR cjb2 (1),
Packit df99a1
.BR c44 (1)