10139N/A<!
DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
10139N/A<!--ArborText, Inc., 1988-1999, v.4002-->
10139N/A<!
ENTITY suncopy "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.">
10139N/A<
refmeta><
refentrytitle>djpeg</
refentrytitle><
manvolnum>1</
manvolnum>
10139N/A<
refmiscinfo class="date">26 Mar 2004</
refmiscinfo>
10139N/A<
refmiscinfo class="sectdesc">&man1;</
refmiscinfo>
10139N/A<
refmiscinfo class="software">&release;</
refmiscinfo>
10139N/A<
refmiscinfo class="arch">generic</
refmiscinfo>
10139N/A<
refmiscinfo class="copyright">&suncopy;</
refmiscinfo>
10139N/A<
indexterm><
primary>djpeg</
primary></
indexterm><
indexterm><
primary>decompress
10139N/Aa JPEG file to an image file</
primary></
indexterm>
10139N/A<
refnamediv id="djpeg-1-name"><
refname>djpeg</
refname><
refpurpose>decompress
10139N/Aa JPEG file to an image file</
refpurpose></
refnamediv>
10139N/A<
refsynopsisdiv id="djpeg-1-synp"><
title>&synp-tt;</
title>
10139N/A<
cmdsynopsis><
command>&cmd;</
command><
arg choice="opt"><
option role="nodash"><
replaceable>
10139N/Aoptions</
replaceable></
option></
arg><
arg choice="opt"><
option role="nodash"><
replaceable>
10139N/Afilename</
replaceable></
option></
arg>
10139N/A<
refsect1 id="djpeg-1-desc"><
title>&desc-tt;</
title>
10139N/A<
para><
command>&cmd;</
command> decompresses the named JPEG file, or the standard
10139N/Ainput if no file is named, and produces an image file on the standard output.
10139N/AThe following output file formats are currently supported:</
para>
10139N/A<
listitem><
para>BMP</
para></
listitem>
10139N/A<
listitem><
para>GIF</
para></
listitem>
10139N/A<
listitem><
para>PGM, the PBMPLUS gray-scale format</
para></
listitem>
10139N/A<
listitem><
para>PPM, the PBMPLUS color format</
para></
listitem>
10139N/A<
listitem><
para>RLE, the Utah Raster Toolkit format</
para></
listitem>
10139N/A<
listitem><
para>Targa</
para></
listitem>
10139N/A<
para>RLE is supported only if the URT library is available.</
para>
10139N/A<
refsect1 id="djpeg-1-opts"><
title>&opts-tt;</
title>
10139N/A<
para>All options may be abbreviated. For example, <
option>grayscale</
option>
10139N/Amay be written <
option>gray</
option> or <
option>gr</
option>. Upper and lower
10139N/Acase are equivalent. For example, <
option>BMP</
option> is the same as <
option>
10139N/Abmp</
option>. British spellings are also accepted. For example, <
option>greyscale
10139N/A<
refsect2 id="djpeg-1-opts-basic">
10139N/A<
para>The following basic options are supported:</
para>
10139N/A<
variablelist termlength="narrow">
10139N/A<
varlistentry><
term><
option>bmp</
option></
term><
listitem><
para>Specify that
10139N/Athe output file is in BMP format, Windows flavor. 8-bit colormapped format
10139N/Ais displayed if <
option>colors</
option> or <
option>grayscale</
option> is specified,
10139N/Aor if the JPEG file is grayscale. Otherwise, 24-bit full-color format is displayed.
10139N/A<
varlistentry><
term><
option>colors <
replaceable>N</
replaceable></
option></
term>
10139N/A<
listitem><
para>Reduce the image to at most <
replaceable>N</
replaceable> colors.
10139N/AThis option reduces the number of colors used in the output image, so that
10139N/Athe output image can be displayed on a colormapped display or stored in a
10139N/Acolormapped file format. For example, if you have an 8-bit display, you must
10139N/Areduce to 256 colors or less. </
para>
10139N/A<
para>You can also use <
option>quantize</
option> to specify this option. However, <
option>
10139N/Acolors</
option> is the recommended option name. The <
option>quantize</
option>
10139N/Aoption is provided only for backwards compatibility.</
para>
10139N/A<
varlistentry><
term><
option>fast</
option></
term><
listitem><
para>Select the
10139N/Arecommended processing options for fast, low-quality output. The default options
10139N/Aare chosen for highest quality output. Currently, this is equivalent to <
option>
10139N/Adct fast</
option> <
option>nosmooth</
option> <
option>onepass</
option> <
option>
10139N/A<
varlistentry><
term><
option>gif</
option></
term><
listitem><
para>Specify that
10139N/Athe output file is in GIF format. GIF does not support more than 256 colors,
10139N/Aso <
option>colors 256</
option> is assumed unless you specify a smaller number
10139N/A<
varlistentry><
term><
option>grayscale</
option></
term><
listitem><
para>Create
10139N/Aa monochrome image file even if the JPEG file is a color file. This option
10139N/Ais useful for viewing images on monochrome displays. <
command>&cmd;</
command>
10139N/Aruns noticeably faster in this mode.</
para>
10139N/A<
varlistentry><
term><
option>os2</
option></
term><
listitem><
para>Specify that
10139N/Athe output file is in BMP format, OS/2
1.x flavor. 8-bit colormapped format
10139N/Ais displayed if <
option>colors</
option> or <
option>grayscale</
option> is specified,
10139N/Aor if the JPEG file is grayscale. Otherwise, 24-bit full-color format is displayed.
10139N/A<
varlistentry><
term><
option>pnm</
option></
term><
listitem><
para>Specify that
10139N/Athe output file is in PBMPLUS format. PGM format is displayed if <
option>
10139N/Agrayscale</
option> is specified, or if the JPEG file is grayscale. Otherwise,
10139N/A<
varlistentry><
term><
option>rle</
option></
term><
listitem><
para>Specify that
10139N/Athe output file is in RLE format. This option requires the URT library.</
para>
10139N/A<
varlistentry><
term><
option>scale <
replaceable>M</
replaceable>/<
replaceable>
10139N/AN</
replaceable></
option></
term><
listitem><
para>Scale the output image by a
10139N/Afactor <
replaceable>M</
replaceable>/<
replaceable>N</
replaceable>. Currently,
10139N/Athe scale factor must be 1/1, 1/2, 1/4, or 1/8. Scaling is useful if the image
10139N/Ais larger than your screen. <
command>&cmd;</
command> runs much faster when
10139N/A<
varlistentry><
term><
option>targa</
option></
term><
listitem><
para>Specify that
10139N/Athe output file is in Targa format. Grayscale format is displayed if <
option>
10139N/Agrayscale</
option> is specified, or if the JPEG file is grayscale. Colormapped
10139N/Aformat is displayed if <
option>colors</
option> is specified. Otherwise, 24-bit
10139N/Afull-color format is displayed.</
para>
10139N/A<
refsect2 id="djpeg-1-opts-int">
10139N/A<
title>Intermediate Options</
title>
10139N/A<
para>The following intermediate options are supported:</
para>
10139N/A<
variablelist termlength="narrow">
10139N/A<
varlistentry><
term><
option>dct fast</
option></
term><
listitem><
para>Use the
10139N/Afast integer DCT method. This method is less accurate than the integer DCT
10139N/Amethod or the floating-point DCT method.</
para>
10139N/A<
varlistentry><
term><
option>dct float</
option></
term><
listitem><
para>Use the
10139N/Afloating-point DCT method. The float method is very slightly more accurate
10139N/Athan the int method, but is much slower unless your machine has very fast
10139N/Afloating-point hardware. The results of the floating-point method may vary
10139N/Aslightly across machines, while the integer methods should give the same results
10139N/A<
varlistentry><
term><
option>dct int</
option></
term><
listitem><
para>Use the
10139N/Ainteger DCT method. This is the default method.</
para>
10139N/A<
varlistentry><
term><
option>dither fs</
option></
term><
listitem><
para>Use Floyd-Steinberg
10139N/Adithering in color quantization. By default, Floyd-Steinberg dithering is
10139N/Aapplied when quantizing colors. This process is slow but usually produces
10139N/Athe best results. This option has no effect unless color quantization is being
10139N/A<
varlistentry><
term><
option>dither none</
option></
term><
listitem><
para>Do
10139N/Anot use dithering in color quantization. No dithering is fast but is usually
10139N/Aof poor quality. This option has no effect unless color quantization is being
10139N/A<
varlistentry><
term><
option>dither ordered</
option></
term><
listitem><
para>
10139N/AUse ordered dithering in color quantization. Ordered dither is a compromise
10139N/Abetween speed and quality. Ordered dither is only available in <
option>onepass
10139N/A</
option> mode. This option has no effect unless color quantization is being
10139N/A<
varlistentry><
term><
option>map <
replaceable>file</
replaceable></
option></
term>
10139N/A<
listitem><
para>Quantize to the colors used in the specified image file. This
10139N/Aoption is useful for producing multiple files with identical color maps, or
10139N/Afor forcing a predefined set of colors to be used. <
replaceable>file</
replaceable>
10139N/Amust be a GIF or PPM file. This option overrides the <
option>colors</
option>
10139N/Aand <
option>onepass</
option> options.</
para>
10139N/A<
varlistentry><
term><
option>maxmemory <
replaceable>N</
replaceable></
option></
term>
10139N/A<
listitem><
para>Set the limit for the amount of memory to use in processing
10139N/Alarge images. <
replaceable>N</
replaceable> is specified in thousands of bytes,
10139N/Aor in millions of bytes if "M" is specified with the number. For example, <
option>
10139N/Amax 4m</
option> selects 4000000 bytes. If more space is needed, temporary
10139N/A<
varlistentry><
term><
option>nosmooth</
option></
term><
listitem><
para>Use a
10139N/Afaster, lower-quality upsampling routine.</
para>
10139N/A<
varlistentry><
term><
option>onepass</
option></
term><
listitem><
para>Use one-pass
10139N/Ainstead of two-pass color quantization. The one-pass method is faster and
10139N/Arequires less memory, but produces a lower-quality image. The <
option>onepass
10139N/A</
option> option is ignored unless you also specify the <
option>colors <
replaceable>
10139N/AN</
replaceable></
option> option. The one-pass method is always used for grayscale
10139N/Aoutput, the two-pass method provides no improvement for such output.</
para>
10139N/A<
varlistentry><
term><
option>outfile <
replaceable>name</
replaceable></
option></
term>
10139N/A<
listitem><
para>Send the output image to the named file, instead of to the
10139N/A<
varlistentry><
term><
option>verbose</
option></
term><
listitem><
para>Display
10139N/Aversion information at startup, and enable debug printout. The <
option>vv
10139N/A</
option> option displays more verbose output than the <
option>v</
option>
10139N/Aoption. The <
option>vvv</
option> option displays the most verbose output.
10139N/AYou can also use <
option>debug</
option> to specify the verbose option.</
para>
10139N/A<
refsect1 id="djpeg-1-oper"><
title>&oper-tt;</
title>
10139N/A<
para>The following operands are supported:</
para>
10139N/A<
variablelist termlength="narrow">
10139N/A<
varlistentry><
term><
option role="nodash"><
replaceable>filename</
replaceable></
option></
term>
10139N/A<
listitem><
para>The name of the JPEG file to be decompressed.</
para>
10139N/A<
refsect1 id="djpeg-1-exde"><
title>&exde-tt;</
title>
10139N/A<
refsect2 id="djpeg-1-exde-hints">
10139N/A<
para>To get a quick preview of an image, use the <
option>grayscale</
option>
10139N/Aor <
option>scale</
option> options, or a combination of both options. For example, <
option>
10139N/Agrayscale</
option> <
option>scale 1/8</
option> is the fastest case.</
para>
10139N/A<
para>Several options trade image quality to gain speed. The <
option>fast
10139N/A</
option> option configures the recommended settings.</
para>
10139N/A<
para>The <
option>dct fast</
option> and <
option>nosmooth</
option> options
10139N/Again speed for a small sacrifice in quality. When producing a color-quantized
10139N/Aimage, <
option>onepass</
option> <
option>dither ordered</
option> is fast but
10139N/Amuch lower quality than the default behavior. <
option>dither none</
option>
10139N/Amay give acceptable results in two-pass mode, but is seldom tolerable in one-pass
10139N/A<
para>If you have very fast floating point hardware, <
option>dct float</
option>
10139N/Amay be even faster than <
option>dct fast</
option>. However, on most machines, <
option>
10139N/Adct float</
option> is slower than <
option>dct int</
option>. In such cases,
10139N/Ado not use <
option>dct float</
option>, because the theoretical accuracy advantage
10139N/Ais too small to be significant in practice.</
para>
10139N/A<
refsect1 id="djpeg-1-exam"><
title>&exam-tt;</
title>
10139N/A<
title>Decompressing the JPEG File
test.jpg, Quantizing to 256 Colors, and
10139N/A<
refsect1 id="djpeg-1-envr"><
title>&envr-tt;</
title>
10139N/A<
para><
command>&cmd;</
command> uses the following environment variables:</
para>
10139N/A<
varlistentry><
term>JPEGMEM</
term><
listitem><
para>The value of this environment
10139N/Avariable, if set, is the default memory limit. The value is specified as described
10139N/Afor the <
option>maxmemory</
option> option. JPEGMEM overrides the default value
10139N/Aspecified when the program was compiled, and is in turn overridden by an explicit <
option>
10139N/Amaxmemory</
option> option.</
para>
10139N/A<
refsect1 id="djpeg-1-attr"><
title>&attr-tt;</
title>
10139N/A<
para>See <
olink targetdocent="REFMAN5" localinfo="attributes-5"><
citerefentry>
10139N/A<
refentrytitle>attributes</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry></
olink>
10139N/Afor descriptions of the following attributes:</
para>
10139N/A<
tgroup cols="2" colsep="1" rowsep="1"><
colspec colname="COLSPEC0" colwidth="1*">
10139N/A<
colspec colname="COLSPEC1" colwidth="1*">
10139N/A<
row><
entry align="center" valign="middle">ATTRIBUTE TYPE</
entry><
entry align="center" 10139N/Avalign="middle">ATTRIBUTE VALUE</
entry></
row>
10139N/A<
row><
entry colname="COLSPEC0"><
para>Interface stability</
para></
entry><
entry 13623N/Acolname="COLSPEC1"><
para>Uncommitted</
para></
entry></
row>
10139N/A<
refsect1 id="djpeg-1-also"><
title>&also-tt;</
title>
10139N/A<!--Reference to another man page--> 10139N/A<!--Reference to a Help manual--> 10139N/A<
para>Wallace, Gregory K., <
citetitle>The JPEG Still Picture Compression Standard
10139N/A</
citetitle> Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
10139N/A<
para><
citerefentry><
refentrytitle>cjpeg</
refentrytitle><
manvolnum>1</
manvolnum>
10139N/A</
citerefentry>, <
citerefentry><
refentrytitle>jpegtran</
refentrytitle><
manvolnum>
10139N/A1</
manvolnum></
citerefentry>, <
citerefentry><
refentrytitle>rdjpgcom</
refentrytitle>
10139N/A<
manvolnum>1</
manvolnum></
citerefentry>, <
citerefentry><
refentrytitle>wrjpgcom
10139N/A</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry></
para>
10139N/A<
refsect1 id="djpeg-1-note"><
title>¬e-tt;</
title>
10139N/A<
para>Arithmetic coding is not supported. <
command>&cmd;</
command> produces
10139N/Auncompressed GIF files. These large files are readable by standard GIF decoders.
10139N/A<
para>This man page was originally written by the Independent JPEG Group.
10139N/AUpdated by Breda McColgan, Sun Microsystems Inc., 2004. </
para>