blob: 5eec670a8e7ec7599a09ad9854d67285ed9c92c3 [file] [log] [blame]
Thomas G. Lanebd543f01991-12-13 00:00:00 +00001.TH DJPEG 1 "11 December 1991"
2.SH NAME
3djpeg \- decompress a JPEG file to an image file
4.SH SYNOPSIS
5.B djpeg
6[
7.B \-GPRTbgD2d
8]
9[
10.BI \-q " N"
11]
12[
13.I filename
14]
15.LP
16.SH DESCRIPTION
17.LP
18.B djpeg
19decompresses the named JPEG file, or the standard input if no file is named,
20and produces an image file on the standard output. PPM, GIF, Targa, or RLE
21output format can be selected. (RLE is supported only if the URT library is
22available.)
23.LP
24The color quantization algorithm is currently shoddy. Because of this, the
25GIF output mode is not recommended in the current release, except for
26gray-scale output (obtained with
27.BR \-g ).
28.SH OPTIONS
29.TP
30.B \-G
31Select GIF output format (implies
32.BR \-q ,
33with default of 256 colors).
34Currently the color quantization uses a shoddy algorithm and external
35quantization (e.g.
36.IR ppmquant ,
37.IR rlequant )
38is recommended before conversion to GIF format.
39.TP
40.B \-P
41Select PPM or PGM output format (this is the default). PGM is emitted if the
42JPEG file is gray-scale or if
43.B \-g
44is specified.
45.TP
46.B \-R
47Select RLE output format. Requires URT library.
48.TP
49.B \-T
50Select Targa output format. Gray-scale format is emitted if the JPEG file is
51gray-scale or if
52.B \-g
53is specified; otherwise, colormapped format is emitted if
54.B \-q
55is specified; otherwise, 24-bit full-color format is emitted.
56.TP
57.B \-b
58Perform cross-block smoothing. This is quite memory-intensive and only seems
59to improve the image at low quality settings (\fB\-Q\fR 10 to 20 or so).
60At normal
61.B \-Q
62settings it may make the image worse.
63.TP
64.B \-g
65Force gray-scale output even if input is color.
66.TP
67.BI \-q " N"
68Quantize to N colors.
69.TP
70.B \-D
71Do not use dithering in color quantization. By default, Floyd-Steinberg
72dithering is applied when quantizing colors, but on some images dithering may
73result in objectionable "graininess". If that happens, you can turn off
74dithering with
75.BR \-D .
76.TP
77.B \-2
78Use two-pass color quantization (not yet supported).
79.TP
80.B \-d
81Enable debug printout. More
82.BR \-d 's
83give more output. Also, version information is printed at startup.
84.SH EXAMPLES
85.LP
86This example decompresses the JPEG file foo.jpg and saves the output
87as a gray-scale image in foo.pgm:
88.IP
89.B djpeg \-g
90.I foo.jpg
91.B >
92.I foo.pgm
93.SH SEE ALSO
94.BR cjpeg (1)
95.br
96.BR ppmquant (1)
97[From the PBMplus distribution]
98.br
99.BR rlequant (1)
100[From the Utah Raster Toolkit distribution]
101.br
102Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
103Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
104.SH AUTHOR
105Independent JPEG Group
106.SH BUGS
107.B djpeg
108currently uses a shoddy color quantization algorithm. This leads to
109poor GIF file output. Two-pass color quantization is not yet
110supported.
111.PP
112Arithmetic coding is not supported for legal reasons.
113.PP
114Not as fast as we'd like.