1 .TH DJPEG 1 "18 January 2013"
3 djpeg \- decompress a JPEG file to an image file
16 decompresses the named JPEG file, or the standard input if no file is named,
17 and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP,
18 GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
19 (RLE is supported only if the URT library is available.)
21 All switch names may be abbreviated; for example,
27 Most of the "basic" switches can be abbreviated to as little as one letter.
28 Upper and lower case are equivalent (thus
32 British spellings are also accepted (e.g.,
34 though for brevity these are not mentioned below.
36 The basic switches are:
39 Reduce image to at most N colors. This reduces the number of colors used in
40 the output image, so that it can be displayed on a colormapped display or
41 stored in a colormapped file format. For example, if you have an 8-bit
42 display, you'd need to reduce to 256 or fewer colors.
48 is the recommended name,
50 is provided only for backwards compatibility.
53 Select recommended processing options for fast, low quality output. (The
54 default options are chosen for highest quality output.) Currently, this is
55 equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
58 Force gray-scale output even if JPEG file is color. Useful for viewing on
59 monochrome displays; also,
61 runs noticeably faster in this mode.
64 Scale the output image by a factor M/N. Currently the scale factor must be
65 M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
66 thereof (such as 1/2, 3/4, etc.) Scaling is handy if the image is larger than
69 runs much faster when scaling down the output.
72 Select BMP output format (Windows flavor). 8-bit colormapped format is
77 is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
81 Select GIF output format. Since GIF does not support more than 256 colors,
83 is assumed (unless you specify a smaller number of colors).
86 Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is
91 is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
95 Select PBMPLUS (PPM/PGM) output format (this is the default format).
96 PGM is emitted if the JPEG file is gray-scale or if
98 is specified; otherwise PPM is emitted.
101 Select RLE output format. (Requires URT library.)
104 Select Targa output format. Gray-scale format is emitted if the JPEG file is
107 is specified; otherwise, colormapped format is emitted if
109 is specified; otherwise, 24-bit full-color format is emitted.
111 Switches for advanced users:
114 Use integer DCT method (default).
117 Use fast integer DCT (less accurate).
120 Use floating-point DCT method.
121 The float method is very slightly more accurate than the int method, but is
122 much slower unless your machine has very fast floating-point hardware. Also
123 note that results of the floating-point method may vary slightly across
124 machines, while the integer methods should give the same results everywhere.
125 The fast integer method is much less accurate than the other two.
128 Use Floyd-Steinberg dithering in color quantization.
131 Use ordered dithering in color quantization.
134 Do not use dithering in color quantization.
135 By default, Floyd-Steinberg dithering is applied when quantizing colors; this
136 is slow but usually produces the best results. Ordered dither is a compromise
137 between speed and quality; no dithering is fast but usually looks awful. Note
138 that these switches have no effect unless color quantization is being done.
139 Ordered dither is only available in
144 Quantize to the colors used in the specified image file. This is useful for
145 producing multiple files with identical color maps, or for forcing a
146 predefined set of colors to be used. The
148 must be a GIF or PPM file. This option overrides
154 Use a faster, lower-quality upsampling routine.
157 Use one-pass instead of two-pass color quantization. The one-pass method is
158 faster and needs less memory, but it produces a lower-quality image.
160 is ignored unless you also say
163 Also, the one-pass method is always used for gray-scale output (the two-pass
164 method is no improvement then).
167 Set limit for amount of memory to use in processing large images. Value is
168 in thousands of bytes, or millions of bytes if "M" is attached to the
171 selects 4000000 bytes. If more space is needed, temporary files will be used.
173 .BI \-outfile " name"
174 Send output image to the named file, not to standard output.
177 Load input file into memory before decompressing. This feature was implemented
178 mainly as a way of testing the in-memory source manager (jpeg_mem_src().)
181 Enable debug printout. More
183 give more output. Also, version information is printed at startup.
190 This example decompresses the JPEG file foo.jpg, quantizes it to
191 256 colors, and saves the output in 8-bit BMP format in foo.bmp:
193 .B djpeg \-colors 256 \-bmp
198 To get a quick preview of an image, use the
203 .B \-grayscale \-scale 1/8
206 Several options are available that trade off image quality to gain speed.
208 turns on the recommended settings.
213 gain speed at a small sacrifice in quality.
214 When producing a color-quantized image,
215 .B \-onepass \-dither ordered
216 is fast but much lower quality than the default behavior.
218 may give acceptable results in two-pass mode, but is seldom tolerable in
221 If you are fortunate enough to have very fast floating point hardware,
222 \fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most
223 machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
224 not worth using, because its theoretical accuracy advantage is too small to be
225 significant in practice.
229 If this environment variable is set, its value is the default memory limit.
230 The value is specified as described for the
234 overrides the default value specified when the program was compiled, and
235 itself is overridden by an explicit
246 Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
247 Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
249 Independent JPEG Group
251 This file was modified by The libjpeg-turbo Project to include only information
252 relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
253 features not present in libjpeg.
255 To avoid the Unisys LZW patent,
257 produces uncompressed GIF files. These are larger than they should be, but
258 are readable by standard GIF decoders.