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¶
didjvu uses the Gamera[1] framework to separate foreground/background layers, which can be then encoded into a DjVu file. didjvu separate generates images mask(s) for the supplied input image(s). Masks are saved in the PNG format. didjvu encode converts the supplied input image(s) to single-page DjVu documents(s). didjvu bundle converts the supplied input image(s) to a bundled multi-page DjVu document.OPTIONS¶
didjvu accepts the following 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
-p, --pages-per-dict=n
Abutaleb locally-adaptive thresholding algorithm
bernsen
Bernsen thresholding algorithm
brink
Brink and Pendock's minimum-cross entropy method
Note
this method requires Gamera ≥ 3.4.0
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
The default is ‘djvu’.
Please consult the Gamera documentation[2] for details.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 foreground
layer.
--fg-subsample=n
Specifies the foreground 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 background subsampling ratio. The default
is 3. Valid values are integers between 1 and 12, inclusive.
XMP support¶
(These options apply to encode and bundle commands 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: TMPDIRdidjvu makes havy use of temporary files. It will
store them in a directory specified by this variable. The default is
/tmp.
TEMPLATE 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 shifted by a number
N.
SEE ALSO¶
djvu(1), djvumake(1), c44(1), cjb2(1), minidjvu(1),NOTES¶
- 1.
- Gamera
- 2.
- Gamera documentation
- 3.
- XMP
- 4.
- Python string formatting syntax
2014-05-12 | didjvu 0.2.8 |