Section: ~DjVuLibre-3.5~ (1)
Return to Main Contents
c44 - DjVuPhoto encode.
c44 [options] inputfilename [outputfilename]
Produces a DjVuPhoto encoded image.
The input image file
can be either a portable gray-map (PGM
) or a portable pix-map (PPM
Input images compressed with
are also accepted. It is however suggested to only use
files (low compression ratio, large size)
because the wavelet compression will increase the defects
already present in highly compressed
The program produces a DjVuPhoto file
If the output file name is not specified,
a default file name will be generated by replacing
the input file name suffix by suffix
The main design objective for the DjVu wavelets consisted of allowing
progressive rendering and smooth scrolling of large images with limited memory
requirements. Decoding functions process the compressed data and update a
memory efficient representation of the wavelet coefficients. Imaging function
then can quickly render an arbitrary segment of the image using the available
data. Both process can be carried out in two threads of execution. This
design plays an important role in the DjVu system. We investigated various
state-of-the-art wavelet compression schemes. Although these schemes may
achieve slightly smaller file sizes, the decoding functions did not even
approach our requirements. The
wavelets reach these requirements today and may in the future implement more
modern refinements if these refinements can be implemented within our
QUALITY SELECTION OPTIONS
DjVuPhoto files are logically composed of a sequence of "slices" containing
successive image refinements. Slices are grouped in "chunks" defining the
progressive rendering sequence. The viewer is able to display an intermediate
image after processing each chunk. A typical DjVuPhoto files contains 80 to
120 slices grouped into 1 to 4 chunks.
The quality selection options provide various ways to specify the number of
chunks and the number of slices per chunk. The
program adds slices to the current chunk until exceeding a target
number of slices, a target file size, or a target quality specification.
The following options define targets for each chunk. The option
argument contain several numerical values (one per chunk) separated
by either commas or pluses.
- -slice n+...+n
Specify the number of slices in each chunk.
The option argument contains plus-separated numerical values (one per chunk)
indicating the number of slices per chunk. Option
for instance, would be appropriate for compressing a photographic image
with three progressive refinements. More quality and more refinements
can be obtained with option
- -slice n,...,n
Specify the cumulative number of slices for each chunk.
Since the final quality is determined by the total number of slices,
it is often more convenient to use comma-separated values (one per chunk)
indicating the cumulative number of slices for each chunk (i.e. including
those encoded in all previous chunks). The values suggested above
can also be expressed as
- -size n,...,n
Specify size targets for each chunk expressed in bytes.
The option argument can be either a plus-separated list specifying a size
for each chunk, or a comma separated list specifying cumulative sizes
for each chunk and all previous chunks. Size targets are approximates.
Slices will be added to each chunk until exceeding the specified target.
- -bpp n,...,n
Specify size targets for each chunk expressed in bits-per-pixel.
Both comma-separated and plus-separated specifications are accepted.
usually provides good results.
- -percent n,...,n
Specify size targets for each chunk expressed as a percentage of the
input file size. Both comma-separated and plus-separated specifications
are accepted. Results can be drastically different according to the
format of the input image (raw or
- -decibel n,...,n
Specify quality targets for each chunk expressed as a comma-separated list of
increasing decibel values. Decibel values range from 16 (very low quality) to
48 (very high quality). This criterion should not be relied upon when
re-encoding an image previously compressed by another compression scheme.
Selecting this option significantly increases the compression time.
- -dbfrac frac
Indicate that the decibel values specified in option
should be computed by averaging the mean squared errors of only the fraction
of the most mis-represented blocks of 32 x 32 pixels. This option is useful
with composite images containing solid color features (e.g. an image with a
large white border).
Providing no quality specification options automatically selects a default
Multiple quality specification options are allowed. The program outputs a
file whose total number of chunks is the largest number of chunks of all
quality specifications. Slices are added to each chunk until reaching any of
the quality target for this chunk.
The following additional options are supported:
- -dpi n
Specify the resolution information encoded into the output file expressed in
dots per inch. The resolution information encoded in DjVu files determine how
the decoder scales the image on a particular display. Meaningful resolutions
range from 25 to 1200. The default value, 100 dpi, should be suitable for
most photographic images.
- -gamma n
Specify the gamma correction information encoded into the output file.
specified the gamma value of the device for which the input image was
designed. The default value is 2.2. This is appropriate for images
designed for a standard computer monitor.
- -mask pbmfilename
The design of the
wavelets allows for compressing partially masked images.
This option can be used when certain pixels of a background
image are going to be covered by foreground objects like text or drawings.
must be a
file whose size matches the size of the input file.
Each black pixel in
means that the value of the corresponding pixel in the input file is
encoder will replace the masked pixels by a color value whose coding
cost is minimal (see
for technical details.)
Select normal chrominance encoding.
Chrominance information is encoded at the same resolution as the luminance.
This is the default.
Selects half resolution chrominance encoding. Chrominance information is
encoded at half the luminance resolution.
- -crcbdelay n
This option can be used with
to modify the quality of the chrominance information.
The option arguments specifies a parameter
expressed in slices, that reduces the bit-rate associated with
the chrominance. The default chrominance encoding delay is
Select the highest possible quality for encoding the chrominance information. This
is equivalent to specifying
-crcbnormal and -crcbdelay 0.
Disable the encoding of the chrominance. Only the luminance information will
be encoded. The resulting image will show in shades of gray.
The default quality setting of the DjVuLibre version of
has been increased.
It produces larger files with a better quality.
Quality can be lowered using the quality selection options!
The encoder requires more memory than necessary.
The rechunking capability is currently broken.
This program was written by Léon Bottou <email@example.com
was then improved by Andrei Erofeev <firstname.lastname@example.org
>, Bill Riemers
> and many others.
- QUALITY SELECTION OPTIONS
- OTHER OPTIONS
- SEE ALSO
This document was created by
using the manual pages.
Time: 00:05:50 GMT, November 14, 2015