blob: df4064c40ef0c6a286e85d0ac3dbf629b92dd8ba [file] [log] [blame]
Thomas G. Lane4a6b7301992-03-17 00:00:00 +00001.TH DJPEG 1 "28 February 1992"
Thomas G. Lanebd543f01991-12-13 00:00:00 +00002.SH NAME
3djpeg \- decompress a JPEG file to an image file
4.SH SYNOPSIS
5.B djpeg
6[
Thomas G. Lane4a6b7301992-03-17 00:00:00 +00007.B \-GPRTgD1bd
Thomas G. Lanebd543f01991-12-13 00:00:00 +00008]
9[
Thomas G. Lane4a6b7301992-03-17 00:00:00 +000010.BI \-q " colors"
11]
12[
13.BI \-m " memory"
Thomas G. Lanebd543f01991-12-13 00:00:00 +000014]
15[
16.I filename
17]
18.LP
19.SH DESCRIPTION
20.LP
21.B djpeg
22decompresses the named JPEG file, or the standard input if no file is named,
23and produces an image file on the standard output. PPM, GIF, Targa, or RLE
24output format can be selected. (RLE is supported only if the URT library is
25available.)
Thomas G. Lanebd543f01991-12-13 00:00:00 +000026.SH OPTIONS
27.TP
28.B \-G
29Select GIF output format (implies
30.BR \-q ,
31with default of 256 colors).
Thomas G. Lanebd543f01991-12-13 00:00:00 +000032.TP
33.B \-P
34Select PPM or PGM output format (this is the default). PGM is emitted if the
35JPEG file is gray-scale or if
36.B \-g
37is specified.
38.TP
39.B \-R
40Select RLE output format. Requires URT library.
41.TP
42.B \-T
43Select Targa output format. Gray-scale format is emitted if the JPEG file is
44gray-scale or if
45.B \-g
46is specified; otherwise, colormapped format is emitted if
47.B \-q
48is specified; otherwise, 24-bit full-color format is emitted.
49.TP
Thomas G. Lanebd543f01991-12-13 00:00:00 +000050.B \-g
51Force gray-scale output even if input is color.
52.TP
53.BI \-q " N"
Thomas G. Lane4a6b7301992-03-17 00:00:00 +000054Quantize to N colors. This reduces the number of colors in the output image
55so that it can be displayed on a colormapped display or stored in a
56colormapped file format. For example, if you have an 8-bit display, you'd
57need to quantize to 256 or fewer colors.
Thomas G. Lanebd543f01991-12-13 00:00:00 +000058.TP
59.B \-D
60Do not use dithering in color quantization. By default, Floyd-Steinberg
61dithering is applied when quantizing colors, but on some images dithering may
62result in objectionable "graininess". If that happens, you can turn off
63dithering with
64.BR \-D .
Thomas G. Lane4a6b7301992-03-17 00:00:00 +000065.B \-D
66is ignored unless you also say
67.B \-q
68or
69.BR \-G .
Thomas G. Lanebd543f01991-12-13 00:00:00 +000070.TP
Thomas G. Lane4a6b7301992-03-17 00:00:00 +000071.B \-1
72Use one-pass instead of two-pass color quantization. The one-pass method is
73faster and needs less memory, but it produces a lower-quality image.
74.B \-1
75is ignored unless you also say
76.B \-q
77or
78.BR \-G .
79Also, the one-pass method is always used for gray-scale output (the two-pass
80method is no improvement then).
81.TP
82.B \-b
83Perform cross-block smoothing. This is quite memory-intensive and only seems
84to improve the image at low quality settings (\fB\-Q\fR 10 to 20 or so).
85At normal
86.B \-Q
87settings it may make the image worse.
Thomas G. Lanebd543f01991-12-13 00:00:00 +000088.TP
89.B \-d
90Enable debug printout. More
91.BR \-d 's
92give more output. Also, version information is printed at startup.
Thomas G. Lane4a6b7301992-03-17 00:00:00 +000093.TP
94.BI \-m " memory"
95Set limit for amount of memory to use in processing large images. Value is
96in thousands of bytes, or millions of bytes if "M" is attached to the
97number. For example,
98.B \-m 4m
99selects 4000000 bytes. If more space is needed, temporary files will be used.
Thomas G. Lanebd543f01991-12-13 00:00:00 +0000100.SH EXAMPLES
101.LP
Thomas G. Lane4a6b7301992-03-17 00:00:00 +0000102This example decompresses the JPEG file foo.jpg, quantizes to 256 colors,
103and saves the output in GIF format in foo.gif:
Thomas G. Lanebd543f01991-12-13 00:00:00 +0000104.IP
Thomas G. Lane4a6b7301992-03-17 00:00:00 +0000105.B djpeg \-G
Thomas G. Lanebd543f01991-12-13 00:00:00 +0000106.I foo.jpg
107.B >
Thomas G. Lane4a6b7301992-03-17 00:00:00 +0000108.I foo.gif
Thomas G. Lanebd543f01991-12-13 00:00:00 +0000109.SH SEE ALSO
110.BR cjpeg (1)
111.br
Thomas G. Lane4a6b7301992-03-17 00:00:00 +0000112.BR ppm (5),
113.BR pgm (5)
Thomas G. Lanebd543f01991-12-13 00:00:00 +0000114.br
115Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
116Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
117.SH AUTHOR
118Independent JPEG Group
119.SH BUGS
Thomas G. Lanebd543f01991-12-13 00:00:00 +0000120Arithmetic coding is not supported for legal reasons.
121.PP
122Not as fast as we'd like.