source: rtems-graphics-toolkit/jpeg-7/djpeg.1 @ 2abf143

base initial
Last change on this file since 2abf143 was 2abf143, checked in by Joel Sherrill <joel.sherrill@…>, on 12/20/09 at 00:59:55

Initial import of jpeg and tiff libraries.

  • Property mode set to 100644
File size: 7.3 KB
Line 
1.TH DJPEG 1 "28 March 2009"
2.SH NAME
3djpeg \- decompress a JPEG file to an image file
4.SH SYNOPSIS
5.B djpeg
6[
7.I options
8]
9[
10.I filename
11]
12.LP
13.SH DESCRIPTION
14.LP
15.B djpeg
16decompresses the named JPEG file, or the standard input if no file is named,
17and produces an image file on the standard output.  PBMPLUS (PPM/PGM), BMP,
18GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
19(RLE is supported only if the URT library is available.)
20.SH OPTIONS
21All switch names may be abbreviated; for example,
22.B \-grayscale
23may be written
24.B \-gray
25or
26.BR \-gr .
27Most of the "basic" switches can be abbreviated to as little as one letter.
28Upper and lower case are equivalent (thus
29.B \-BMP
30is the same as
31.BR \-bmp ).
32British spellings are also accepted (e.g.,
33.BR \-greyscale ),
34though for brevity these are not mentioned below.
35.PP
36The basic switches are:
37.TP
38.BI \-colors " N"
39Reduce image to at most N colors.  This reduces the number of colors used in
40the output image, so that it can be displayed on a colormapped display or
41stored in a colormapped file format.  For example, if you have an 8-bit
42display, you'd need to reduce to 256 or fewer colors.
43.TP
44.BI \-quantize " N"
45Same as
46.BR \-colors .
47.B \-colors
48is the recommended name,
49.B \-quantize
50is provided only for backwards compatibility.
51.TP
52.B \-fast
53Select recommended processing options for fast, low quality output.  (The
54default options are chosen for highest quality output.)  Currently, this is
55equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
56.TP
57.B \-grayscale
58Force gray-scale output even if JPEG file is color.  Useful for viewing on
59monochrome displays; also,
60.B djpeg
61runs noticeably faster in this mode.
62.TP
63.BI \-scale " M/N"
64Scale the output image by a factor M/N.  Currently supported scale factors are
65M/8 with all M from 1 to 16.  If the /N part is omitted, then M specifies the
66DCT scaled size to be applied on the given input, which is currently
67equivalent to M/8 scaling, since the source DCT size is currently always 8.
68Scaling is handy if the image is larger than your screen; also,
69.B djpeg
70runs much faster when scaling down the output.
71.TP
72.B \-bmp
73Select BMP output format (Windows flavor).  8-bit colormapped format is
74emitted if
75.B \-colors
76or
77.B \-grayscale
78is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
79format is emitted.
80.TP
81.B \-gif
82Select GIF output format.  Since GIF does not support more than 256 colors,
83.B \-colors 256
84is assumed (unless you specify a smaller number of colors).
85.TP
86.B \-os2
87Select BMP output format (OS/2 1.x flavor).  8-bit colormapped format is
88emitted if
89.B \-colors
90or
91.B \-grayscale
92is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
93format is emitted.
94.TP
95.B \-pnm
96Select PBMPLUS (PPM/PGM) output format (this is the default format).
97PGM is emitted if the JPEG file is gray-scale or if
98.B \-grayscale
99is specified; otherwise PPM is emitted.
100.TP
101.B \-rle
102Select RLE output format.  (Requires URT library.)
103.TP
104.B \-targa
105Select Targa output format.  Gray-scale format is emitted if the JPEG file is
106gray-scale or if
107.B \-grayscale
108is specified; otherwise, colormapped format is emitted if
109.B \-colors
110is specified; otherwise, 24-bit full-color format is emitted.
111.PP
112Switches for advanced users:
113.TP
114.B \-dct int
115Use integer DCT method (default).
116.TP
117.B \-dct fast
118Use fast integer DCT (less accurate).
119.TP
120.B \-dct float
121Use floating-point DCT method.
122The float method is very slightly more accurate than the int method, but is
123much slower unless your machine has very fast floating-point hardware.  Also
124note that results of the floating-point method may vary slightly across
125machines, while the integer methods should give the same results everywhere.
126The fast integer method is much less accurate than the other two.
127.TP
128.B \-dither fs
129Use Floyd-Steinberg dithering in color quantization.
130.TP
131.B \-dither ordered
132Use ordered dithering in color quantization.
133.TP
134.B \-dither none
135Do not use dithering in color quantization.
136By default, Floyd-Steinberg dithering is applied when quantizing colors; this
137is slow but usually produces the best results.  Ordered dither is a compromise
138between speed and quality; no dithering is fast but usually looks awful.  Note
139that these switches have no effect unless color quantization is being done.
140Ordered dither is only available in
141.B \-onepass
142mode.
143.TP
144.BI \-map " file"
145Quantize to the colors used in the specified image file.  This is useful for
146producing multiple files with identical color maps, or for forcing a
147predefined set of colors to be used.  The
148.I file
149must be a GIF or PPM file. This option overrides
150.B \-colors
151and
152.BR \-onepass .
153.TP
154.B \-nosmooth
155Don't use high-quality upsampling.
156.TP
157.B \-onepass
158Use one-pass instead of two-pass color quantization.  The one-pass method is
159faster and needs less memory, but it produces a lower-quality image.
160.B \-onepass
161is ignored unless you also say
162.B \-colors
163.IR N .
164Also, the one-pass method is always used for gray-scale output (the two-pass
165method is no improvement then).
166.TP
167.BI \-maxmemory " N"
168Set limit for amount of memory to use in processing large images.  Value is
169in thousands of bytes, or millions of bytes if "M" is attached to the
170number.  For example,
171.B \-max 4m
172selects 4000000 bytes.  If more space is needed, temporary files will be used.
173.TP
174.BI \-outfile " name"
175Send output image to the named file, not to standard output.
176.TP
177.B \-verbose
178Enable debug printout.  More
179.BR \-v 's
180give more output.  Also, version information is printed at startup.
181.TP
182.B \-debug
183Same as
184.BR \-verbose .
185.SH EXAMPLES
186.LP
187This example decompresses the JPEG file foo.jpg, quantizes it to
188256 colors, and saves the output in 8-bit BMP format in foo.bmp:
189.IP
190.B djpeg \-colors 256 \-bmp
191.I foo.jpg
192.B >
193.I foo.bmp
194.SH HINTS
195To get a quick preview of an image, use the
196.B \-grayscale
197and/or
198.B \-scale
199switches.
200.B \-grayscale \-scale 1/8
201is the fastest case.
202.PP
203Several options are available that trade off image quality to gain speed.
204.B \-fast
205turns on the recommended settings.
206.PP
207.B \-dct fast
208and/or
209.B \-nosmooth
210gain speed at a small sacrifice in quality.
211When producing a color-quantized image,
212.B \-onepass \-dither ordered
213is fast but much lower quality than the default behavior.
214.B \-dither none
215may give acceptable results in two-pass mode, but is seldom tolerable in
216one-pass mode.
217.PP
218If you are fortunate enough to have very fast floating point hardware,
219\fB\-dct float\fR may be even faster than \fB\-dct fast\fR.  But on most
220machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
221not worth using, because its theoretical accuracy advantage is too small to be
222significant in practice.
223.SH ENVIRONMENT
224.TP
225.B JPEGMEM
226If this environment variable is set, its value is the default memory limit.
227The value is specified as described for the
228.B \-maxmemory
229switch.
230.B JPEGMEM
231overrides the default value specified when the program was compiled, and
232itself is overridden by an explicit
233.BR \-maxmemory .
234.SH SEE ALSO
235.BR cjpeg (1),
236.BR jpegtran (1),
237.BR rdjpgcom (1),
238.BR wrjpgcom (1)
239.br
240.BR ppm (5),
241.BR pgm (5)
242.br
243Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
244Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
245.SH AUTHOR
246Independent JPEG Group
247.SH BUGS
248To avoid the Unisys LZW patent,
249.B djpeg
250produces uncompressed GIF files.  These are larger than they should be, but
251are readable by standard GIF decoders.
Note: See TracBrowser for help on using the repository browser.