1C44(1)                           DjVuLibre-3.5                          C44(1)
2
3
4

NAME

6       c44 - DjVuPhoto encode.
7

SYNOPSIS

9       c44 [options] inputfilename [outputfilename]
10

DESCRIPTION

12       Produces a DjVuPhoto encoded image.  The input image file inputfilename
13       can be either a portable gray-map (PGM) or a  portable  pix-map  (PPM).
14       Input images compressed with JPEG are also accepted. It is however sug‐
15       gested to only use high quality  JPEG  files  (low  compression  ratio,
16       large  size)  because the wavelet compression will increase the defects
17       already present in highly compressed JPEG files.
18
19       The program produces a DjVuPhoto file outputfilename.   If  the  output
20       file  name  is  not specified, a default file name will be generated by
21       replacing the input file name suffix by suffix djvu.
22
23       The main design objective for the DjVu wavelets consisted  of  allowing
24       progressive rendering and smooth scrolling of large images with limited
25       memory requirements.  Decoding functions process  the  compressed  data
26       and  update  a  memory  efficient representation of the wavelet coeffi‐
27       cients.  Imaging function then can quickly render an arbitrary  segment
28       of the image using the available data.  Both process can be carried out
29       in two threads of execution.  This design plays an  important  role  in
30       the DjVu system.  We investigated various state-of-the-art wavelet com‐
31       pression schemes.  Although these schemes may achieve slightly  smaller
32       file  sizes,  the decoding functions did not even approach our require‐
33       ments.  The IW44 wavelets reach these requirements today and may in the
34       future  implement  more  modern refinements if these refinements can be
35       implemented within our constraints.
36

QUALITY SELECTION OPTIONS

38       DjVuPhoto files are logically composed of a sequence of  "slices"  con‐
39       taining  successive  image refinements.  Slices are grouped in "chunks"
40       defining the progressive rendering sequence.  The  viewer  is  able  to
41       display  an  intermediate image after processing each chunk.  A typical
42       DjVuPhoto files contains 80 to 120 slices grouped into 1 to 4 chunks.
43
44       The quality selection options provide various ways to specify the  num‐
45       ber of chunks and the number of slices per chunk.  The c44 program adds
46       slices to the current chunk until exceeding a target number of  slices,
47       a  target  file size, or a target quality specification.  The following
48       options define targets for each chunk.   The  option  argument  contain
49       several  numerical values (one per chunk) separated by either commas or
50       pluses.
51
52       -slice n+...+n
53              Specify the number of slices in each chunk.  The option argument
54              contains  plus-separated  numerical values (one per chunk) indi‐
55              cating the number of slices per chunk.  Option -slice  74+13+10,
56              for  instance,  would  be  appropriate  for compressing a photo‐
57              graphic image with three progressive refinements.  More  quality
58              and   more  refinements  can  be  obtained  with  option  -slice
59              72+11+10+10.
60
61       -slice n,...,n
62              Specify the cumulative number of slices for each  chunk.   Since
63              the  final  quality is determined by the total number of slices,
64              it is often more convenient to use comma-separated  values  (one
65              per  chunk)  indicating the cumulative number of slices for each
66              chunk (i.e. including those encoded  in  all  previous  chunks).
67              The  values  suggested  above  can  also  be expressed as -slice
68              74,87,97 and -slice 72,83,93,103.
69
70       -size n,...,n
71              Specify size targets for each chunk  expressed  in  bytes.   The
72              option argument can be either a plus-separated list specifying a
73              size for each chunk, or a comma separated list specifying  cumu‐
74              lative  sizes for each chunk and all previous chunks.  Size tar‐
75              gets are approximates.  Slices will be added to each chunk until
76              exceeding the specified target.
77
78       -bpp n,...,n
79              Specify size targets for each chunk expressed in bits-per-pixel.
80              Both  comma-separated  and  plus-separated  specifications   are
81              accepted.  Option -bpp 0.25,0.5,1 usually provides good results.
82
83       -percent n,...,n
84              Specify size targets for each chunk expressed as a percentage of
85              the input file size.  Both  comma-separated  and  plus-separated
86              specifications are accepted.  Results can be drastically differ‐
87              ent according to the format of the input image (raw or JPEG com‐
88              pressed).
89
90       -decibel n,...,n
91              Specify quality targets for each chunk expressed as a comma-sep‐
92              arated list of increasing decibel values.  Decibel values  range
93              from 16 (very low quality) to 48 (very high quality).  This cri‐
94              terion should not be relied upon when re-encoding an image  pre‐
95              viously  compressed  by  another  compression scheme.  Selecting
96              this option significantly increases the compression time.
97
98       -dbfrac frac
99              Indicate that the decibel values specified  in  option  -decibel
100              should  be computed by averaging the mean squared errors of only
101              the fraction frac of the most mis-represented blocks of 32 x  32
102              pixels.   This option is useful with composite images containing
103              solid color features (e.g. an image with a large white border).
104
105       Providing no quality  specification  options  automatically  selects  a
106       default quality specification -slice 74,89,99.  Multiple quality speci‐
107       fication options are allowed.  The program outputs a file  whose  total
108       number  of chunks is the largest number of chunks of all quality speci‐
109       fications.  Slices are added to each chunk until reaching  any  of  the
110       quality target for this chunk.
111

OTHER OPTIONS

113       The following additional options are supported:
114
115       -dpi n Specify  the resolution information encoded into the output file
116              expressed in dots per inch. The resolution  information  encoded
117              in  DjVu  files  determine how the decoder scales the image on a
118              particular display.  Meaningful resolutions  range  from  25  to
119              1200.   The  default value, 100 dpi, should be suitable for most
120              photographic images.
121
122       -gamma n
123              Specify the gamma correction information encoded into the output
124              file.   The  argument  n specified the gamma value of the device
125              for which the input image was designed.  The  default  value  is
126              2.2.   This  is  appropriate  for images designed for a standard
127              computer monitor.
128
129       -mask pbmfilename
130              The design of the IW44 wavelets allows for compressing partially
131              masked images.  This option can be used when certain pixels of a
132              background image are going to be covered by  foreground  objects
133              like  text  or  drawings.  File pbmfile must be a PBM file whose
134              size matches the size of the input file.  Each  black  pixel  in
135              pbmfile  means  that the value of the corresponding pixel in the
136              input file is irrelevant.  The IW44  encoder  will  replace  the
137              masked pixels by a color value whose coding cost is minimal (see
138              http://www.djvuzone.org/djvu/techpapers/mask/index.djvu      for
139              technical details.)
140
141       -crcbnormal
142              Select  normal chrominance encoding.  Chrominance information is
143              encoded at the same resolution as the luminance.   This  is  the
144              default.
145
146       -crcbhalf
147              Selects   half  resolution  chrominance  encoding.   Chrominance
148              information is encoded at half the luminance resolution.
149
150       -crcbdelay n
151              This option can be used with -crcbnormal and -crcbhalf to modify
152              the  quality  of  the chrominance information.  The option argu‐
153              ments specifies a parameter n, expressed in slices, that reduces
154              the  bit-rate  associated  with  the  chrominance.   The default
155              chrominance encoding delay is 10 slices.
156
157       -crcbfull
158              Select the highest possible quality for encoding the chrominance
159              information.  This  is  equivalent to specifying -crcbnormal and
160              -crcbdelay 0.
161
162       -crcbnone
163              Disable the encoding of the  chrominance.   Only  the  luminance
164              information  will  be  encoded. The resulting image will show in
165              shades of gray.
166

REMARKS

168       The default quality setting of the DjVuLibre version of  c44  has  been
169       increased.   It  produces  larger files with a better quality.  Quality
170       can be lowered using the quality selection options!
171

BUGS

173       The encoder requires more memory than necessary.
174       The rechunking capability is currently broken.
175

CREDITS

177       This program was written by Léon  Bottou  <leonb@users.sourceforge.net>
178       and  was  then  improved  by Andrei Erofeev <andrew_erofeev@yahoo.com>,
179       Bill Riemers <docbill@sourceforge.net> and many others.
180

SEE ALSO

182       djvu(1), pnm(5), cjpeg(1).
183
184
185
186DjVuLibre-3.5                     10/11/2001                            C44(1)
Impressum