table of contents
DIDJVU(1) | didjvu manual | DIDJVU(1) |
NAME¶
didjvu - DjVu encoder with foreground/background separationSYNOPSIS¶
didjvu
separate [{
-o | --output} output-mask] [
option...] input-image
didjvu
separate --output-template name-template
[option...] input-image...
didjvu
encode [{ -o | --output} output-djvu]
[ option...] input-image
didjvu
encode --output-template name-template
[option...] input-image...
didjvu
bundle [{ -o | --output} output-djvu]
[ option...] input-image...
didjvu
{ --version | --help | -h}
DESCRIPTION¶
OPTIONS¶
Input, output¶
-o, --output=output-djvuGenerate a bundled multi-page document. Write
the file into output-djvu file instead of standard output.
For separate and encode commands this option is allowed only if
there is exactly one input file (i.e. exactly one output file).
--output-template=template
Specifies the naming scheme for output files
for the separate and encode commands. Please consult the
“TEMPLATE LANGUAGE” section for the template language description.
This option is mandatory if there is more than one input file (i.e. more than
one output file).
--pageid-template=template
Specifies the naming scheme for page
identifiers for the bundle command. Please consult the “TEMPLATE
LANGUAGE” section for the template language description. The default
template is “{base-ext}.djvu”.
For portability reasons, page identifiers:
•must consist only of lowercase ASCII
letters, digits, _, +, - and dot,
•cannot start with a +, - or a
dot,
•cannot contain two consecutive
dots,
•must end with the .djvu
extension.
Masks¶
--loss-level=nSpecifies the aggressiveness of the lossy
compression for the separate and encode commands. The default is
0 (lossless). Valid values are integers between 0 and 200, inclusive.
This option is similar to the -losslevel option of cjb2; please
consult the cjb2(1) manual page for details.
--lossless
Synonym for --loss-level=0.
--clean
Synonym for --loss-level=1.
--lossy
Synonym for --loss-level=100.
-m, --method=method
Use the selected method to generate image mask
(i.e. separate foreground from background). The following methods should be
available:
abutaleb
The default is ‘djvu’.
Please consult the Gamera documentation[2] for details.
-p, --pages-per-dict=n
Abutaleb locally-adaptive thresholding
algorithm
bernsen
Bernsen thresholding algorithm
djvu
DjVu thresholding algorithm
niblack
Niblack adaptive thresholding algorithm
otsu
Otsu thresholding algorithm
sauvola
Sauvola adaptive thresholding algorithm
shading-subtraction
thresholds an image after subtracting a
possibly shaded background
Note
this method requires Gamera ≥ 3.3.1
tsai
splitting along a threshold value determined
using the Tsai Moment Preserving Threshold algorithm
white-rohrer
White and Rohrer dynamic thresholding
algorithm
For bundle command: if n > 1,
compress mask using minidjvu using n pages in one pass. The
default is 1.
--masks, --mask=input-mask
Use the pre-generated image masks for the
encode and bundle commands.
Foreground/background quality, resolution¶
(These options apply to encode and bundle commands only.) -d, --dpi=resolutionSpecifies the desired resolution to
resolution dots per inch. The default is 300 dpi. The allowed range is:
72 ≤ resolution ≤ 6000.
--fg-slices=n
Specifies the encoding quality of the IW44
foreground layer. The default is 100.
This option is similar to the -slice option of c44; please consult
the c44(1) manual page for details.
--fg-crcb=normal
Select normal chrominance encoding of the
foreground layer.
--fg-crcb=half
Select half resolution chrominance encoding of
the foreground layer.
--fg-crcb=full
Select the highest possible quality for
encoding the chrominance information of the foreground layer. This is the
default.
--fg-crcb=none
Disable the encoding of the chrominance of the
background layer.
--fg-subsample=n
Specifies the foreground/background
subsampling ratio. The default is 6. Valid values are integers between 1 and
12, inclusive.
--bg-slices=n+...+n,
--bg-slices=n,...,n
Specifies the encoding quality of the IW44
background layer. The default is 74+10+6+7.
This option is similar to the -slice option of c44; please consult
the c44(1) manual page for details.
--bg-crcb=normal
Select normal chrominance encoding of the
background layer. This is the default.
--bg-crcb=half
Select half resolution chrominance encoding of
the background layer.
--bg-crcb=full
Select the highest possible quality for
encoding the chrominance information of the background layer.
--bg-crcb=none
Disable the encoding of the chrominance of the
background layer.
--bg-subsample=n
Specifies the foreground/background
subsampling ratio. The default is 3. Valid values are integers between 1 and
12, inclusive.
XMP support¶
(These options apply to encode command only.) --xmpCreate sidecar XMP[3] metadata.
Note
This option is experimental!
Verbosity, help¶
-v, --verboseDisplay more informational messages while
converting the file.
-q, --quiet
Don't display informational messages while
converting the file.
--version
Output version information and exit.
-h, --help
Display help and exit.
ENVIRONMENT¶
The following environment variables affects didjvu: TMPDIRTEMPLATE LANGUAGE¶
Template syntax¶
The template language uses the Python string formatting syntax[4].Available field names¶
nameInput file path.
name-ext
Input file path without file extension.
base
Input file name without directory
components.
base-ext
Input file name without directory components
and without file extension.
page, page+N, page-N
Page number, optionally offseted by a number
N.
SEE ALSO¶
AUTHOR¶
Jakub Wilk <jwilk@jwilk.net>Author.
NOTES¶
- 1.
- Gamera
- 2.
- Gamera documentation
- 3.
- XMP
- 4.
- Python string formatting syntax
02/01/2012 | didjvu 0.2.3 |