.TH DJPEG 1 "Independent JPEG Group" ""
.SH NAME
djpeg \- JPEG Decompressor
.SH SYNTAX
.PP
\fBdjpeg \fP[-G] [-b] [-g] [-q \fIN\fP] [-D] [-2] [-d]
.SH DESCRIPTION
\fIdjpeg\fP decompresses a 24-bit image.
.SH OPTIONS
The command line switches for djpeg are:
.TP 8
-G
Select GIF output format (implies \fB-q\fP, with default of 256 colors).
.TP 8
-b
Perform cross-block smoothing.  This is quite memory-intensive and
only seems to improve the image at very low quality settings (\fB-Q
10\fP to \fB20\fP or so).
.TP 8
-g
Force gray-scale output even if input is color.
.TP 8
-q \fIN\fP		Quantize to \fIN\fP colors.
.TP 8
-D
Use Floyd-Steinberg dithering in color quantization.
.TP 8
-2
Use two-pass color quantization (not yet supported).
.TP 8
-d
Enable debug printout.  More -d's give more printout.
.SH BUGS
.PP
Color quantization currently uses a rather shoddy algorithm (although
it's not so horrible when dithered).  Because of this, the GIF output
mode is not recommended in the current release, except for gray-scale
output.  You can get better results by applying \fBppmquant\fP to the
unquantized (PPM) output of djpeg, then converting to GIF with
\fBppmtogif\fP.  We expect to provide a considerably better
quantization algorithm in a future release.
.PP
Note that \fBdjpeg\fP *can* read noninterleaved JPEG files even though
\fBcjpeg\fP can't yet generate them.  For most applications this is a
nonissue, since hardly anybody seems to be using noninterleaved
format.
.PP
On a non-virtual-memory machine, you may run out of memory if you use
\fB-q \fP\fIN\fP \fB-2\fP in \fBdjpeg\fP, or try to read an interlaced
GIF file.  This will be addressed eventually by replacing jvirtmem.c
with something that uses temporary files for large images.
.SH "SEE ALSO"
.PP
cjpeg(1X)
.PP
The file \fBREADME\fP in /usr/src/X/contrib/clients/jpeg.  (In the
Xsource package).
.SH COPYRIGHT
.PP
This software is copyright (C) 1991, Thomas G. Lane.
.br
All Rights Reserved except as specified below.
.PP
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
.TP 5
(1)
If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
.TP 5
(2)
If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
.TP 5
(3)
Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
.PP
Permission is NOT granted for the use of any author's name or author's company
name in advertising or publicity relating to this software or products derived
from it.  This software may be referred to only as "the Independent JPEG
Group's software".
