1C44(1) DjVuLibre-3.5 C44(1)
2
3
4
6 c44 - DjVuPhoto encode.
7
8
10 c44 [options] inputfilename [outputfilename]
11
12
14 Produces a DjVuPhoto encoded image. The input image file inputfilename
15 can be either a portable gray-map ( PGM ) or a portable pix-map (.SM
16 PPM ). Input images compressed with JPEG are also accepted. It is how‐
17 ever suggested to only use high quality JPEG files ( low compression
18 ratio, large size ) because the wavelet compression will increase the
19 defects already present in highly compressed JPEG files.
20
21 The program produces a DjVuPhoto file outputfilename. If the output
22 file name is not specified, a default file name will be generated by
23 replacing the input file name suffix by suffix djvu.
24
25 The main design objective for the DjVu wavelets consisted of allowing
26 progressive rendering and smooth scrolling of large images with limited
27 memory requirements. Decoding functions process the compressed data
28 and update a memory efficient representation of the wavelet coeffi‐
29 cients. Imaging function then can quickly render an arbitrary segment
30 of the image using the available data. Both process can be carried out
31 in two threads of execution. This design plays an important role in
32 the DjVu system. We investigated various state-of-the-art wavelet com‐
33 pression schemes. Although these schemes may achieve slightly smaller
34 file sizes, the decoding functions did not even approach our require‐
35 ments. The IW44 wavelets reach these requirements today and may in the
36 future implement more modern refinements if these refinements can be
37 implemented within our constraints.
38
39
41 DjVuPhoto files are logically composed of a sequence of "slices" con‐
42 taining successive image refinements. Slices are grouped in "chunks"
43 defining the progressive rendering sequence. The viewer is able to
44 display an intermediate image after processing each chunk. A typical
45 DjVuPhoto files contains 80 to 120 slices grouped into 1 to 4 chunks.
46
47 The quality selection options provide various ways to specify the num‐
48 ber of chunks and the number of slices per chunk. The c44 program adds
49 slices to the current chunk until exceeding a target number of slices,
50 a target file size, or a target quality specification. The following
51 options define targets for each chunk. The option argument contain
52 several numerical values (one per chunk) separated by either commas or
53 pluses.
54
55
56 -slice n+...+n
57 Specify the number of slices in each chunk. The option argument
58 contains plus-separated numerical values (one per chunk) indi‐
59 cating the number of slices per chunk. Option -slice 74+13+10,
60 for instance, would be appropriate for compressing a photo‐
61 graphic image with three progressive refinements. More quality
62 and more refinements can be obtained with option -slice
63 72+11+10+10.
64
65 -slice n,...,n
66 Specify the cumulative number of slices for each chunk. Since
67 the final quality is determined by the total number of slices,
68 it is often more convenient to use comma-separated values (one
69 per chunk) indicating the cumulative number of slices for each
70 chunk (i.e. including those encoded in all previous chunks).
71 The values suggested above can also be expressed as -slice
72 74,87,97 and -slice 72,83,93,103.
73
74 -size n,...,n
75 Specify size targets for each chunk expressed in bytes. The
76 option argument can be either a plus-separated list specifying a
77 size for each chunk, or a comma separated list specifying cumu‐
78 lative sizes for each chunk and all previous chunks. Size tar‐
79 gets are approximates. Slices will be added to each chunk until
80 exceeding the specified target.
81
82 -bpp n,...,n
83 Specify size targets for each chunk expressed in bits-per-pixel.
84 Both comma-separated and plus-separated specifications are
85 accepted. Option -bpp 0.25,0.5,1 usually provides good results.
86
87 -percent n,...,n
88 Specify size targets for each chunk expressed as a percentage of
89 the input file size. Both comma-separated and plus-separated
90 specifications are accepted. Results can be drastically differ‐
91 ent according to the format of the input image (raw or JPEG com‐
92 pressed).
93
94 -decibel n,...,n
95 Specify quality targets for each chunk expressed as a comma-sep‐
96 arated list of increasing decibel values. Decibel values range
97 from 16 (very low quality) to 48 (very high quality). This cri‐
98 terion should not be relied upon when re-encoding an image pre‐
99 viously compressed by another compression scheme. Selecting
100 this option significantly increases the compression time.
101
102 -dbfrac frac
103 Indicate that the decibel values specified in option -quality
104 should be computed by averaging the mean squared errors of only
105 the fraction frac of the most mis-represented blocks of 32 x 32
106 pixels. This option is useful with composite images containing
107 solid color features (e.g. an image with a large white border).
108
109 Providing no quality specification options automatically selects a
110 default quality specification -slice 74,89,99. Multiple quality speci‐
111 fication options are allowed. The program outputs a file whose total
112 number of chunks is the largest number of chunks of all quality speci‐
113 fications. Slices are added to each chunk until reaching any of the
114 quality target for this chunk.
115
116
118 The following additional options are supported:
119
120 -dpi n Specify the resolution information encoded into the output file
121 expressed in dots per inch. The resolution information encoded
122 in DjVu files determine how the decoder scales the image on a
123 particular display. Meaningful resolutions range from 25 to
124 1200. The default value, 100 dpi, should be suitable for most
125 photographic images.
126
127 -gamma n
128 Specify the gamma correction information encoded into the output
129 file. The argument n specified the gamma value of the device
130 for which the input image was designed. The default value is
131 2.2. This is appropriate for images designed for a standard
132 computer monitor.
133
134 -mask pbmfilename
135 The design of the IW44 wavelets allows for compressing partially
136 masked images. This option can be used when certain pixels of a
137 background image are going to be covered by foreground objects
138 like text or drawings. File pbmfile must be a PBM file whose
139 size matches the size of the input file. Each black pixel in
140 pbmfile means that the value of the corresponding pixel in the
141 input file is irrelevant. The IW44 encoder will replace the
142 masked pixels by a color value whose coding cost is minimal (see
143 http://www.djvuzone.org/djvu/techpapers/mask/index.djvu for
144 technical details.)
145
146 -crcbnormal
147 Select normal chrominance encoding. Chrominance information is
148 encoded at the same resolution as the luminance. This is the
149 default.
150
151 -crcbhalf
152 Selects half resolution chrominance encoding. Chrominance
153 information is encoded at half the luminance resolution.
154
155 -crcbdelay n
156 This option can be used with -crcbnormal and -crcbhalf to modify
157 the quality of the chrominance information. The option argu‐
158 ments specifies a parameter n, expressed in slices, that reduces
159 the bit-rate associated with the chrominance. The default
160 chrominance encoding delay is 10 slices.
161
162 -crcbfull
163 Select the highest possible quality for encoding the chrominance
164 information. This is equivalent to specifying -crcbnormal and
165 -crcbdelay 0.
166
167 -crcbnone
168 Disable the encoding of the chrominance. Only the luminance
169 information will be encoded. The resulting image will show in
170 shades of gray.
171
173 The default quality setting of the DjVuLibre version of c44 has been
174 increased. It produces larger files with a better quality. Quality
175 can be lowered using the quality selection options!.
176
177
179 The encoder requires more memory than necessary.
180 The rechunking capability is currently broken.
181
182
184 This program was written by Léon Bottou <leonb@users.sourceforge.net>
185 and was then improved by Andrei Erofeev <andrew_erofeev@yahoo.com>,
186 Bill Riemers <docbill@sourceforge.net> and many others.
187
188
189
191 djvu(1), pnm(5), cjpeg(1)
192
193
194
195DjVuLibre-3.5 10/11/2001 C44(1)