Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
djpeg(1)
Edit
PageHistory
Diff
Info
LikePages
DJPEG !!!DJPEG NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES HINTS ENVIRONMENT SEE ALSO AUTHOR BUGS ---- !!NAME djpeg - decompress a JPEG file to an image file !!SYNOPSIS __djpeg__ [[ ''options'' ] [[ ''filename'' ] !!DESCRIPTION __djpeg__ decompresses the named JPEG file, or the standard input if no file is named, and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. (RLE is supported only if the URT library is available.) !!OPTIONS All switch names may be abbreviated; for example, __-grayscale__ may be written __-gray__ or __-gr__. Most of the __-BMP__ is the same as __-bmp__). British spellings are also accepted (e.g., __-greyscale__), though for brevity these are not mentioned below. The basic switches are: __-colors__ ''N'' Reduce image to at most N colors. This reduces the number of colors used in the output image, so that it can be displayed on a colormapped display or stored in a colormapped file format. For example, if you have an 8-bit display, you'd need to reduce to 256 or fewer colors. __-quantize__ ''N'' Same as __-colors__. __-colors__ is the recommended name, __-quantize__ is provided only for backwards compatibility. __-fast__ Select recommended processing options for fast, low quality output. (The default options are chosen for highest quality output.) Currently, this is equivalent to __-dct fast -nosmooth -onepass -dither ordered__. __-grayscale__ Force gray-scale output even if JPEG file is color. Useful for viewing on monochrome displays; also, __djpeg__ runs noticeably faster in this mode. __-scale__ ''M/N'' Scale the output image by a factor M/N. Currently the scale factor must be 1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your screen; also, __djpeg__ runs much faster when scaling down the output. __-bmp__ Select BMP output format (Windows flavor). 8-bit colormapped format is emitted if __-colors__ or __-grayscale__ is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color format is emitted. __-gif__ Select GIF output format. Since GIF does not support more than 256 colors, __-colors 256__ is assumed (unless you specify a smaller number of colors). __-os2__ Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is emitted if __-colors__ or __-grayscale__ is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color format is emitted. __-pnm__ Select PBMPLUS (PPM/PGM) output format (this is the default format). PGM is emitted if the JPEG file is gray-scale or if __-grayscale__ is specified; otherwise PPM is emitted. __-rle__ Select RLE output format. (Requires URT library.) __-targa__ Select Targa output format. Gray-scale format is emitted if the JPEG file is gray-scale or if __-grayscale__ is specified; otherwise, colormapped format is emitted if __-colors__ is specified; otherwise, 24-bit full-color format is emitted. Switches for advanced users: __-dct int__ Use integer DCT method (default). __-dct fast__ Use fast integer DCT (less accurate). __-dct float__ Use floating-point DCT method. The float method is very slightly more accurate than the int method, but is much slower unless your machine has very fast floating-point hardware. Also note that results of the floating-point method may vary slightly across machines, while the integer methods should give the same results everywhere. The fast integer method is much less accurate than the other two. __-dither fs__ Use Floyd-Steinberg dithering in color quantization. __-dither ordered__ Use ordered dithering in color quantization. __-dither none__ Do not use dithering in color quantization. By default, Floyd-Steinberg dithering is applied when quantizing colors; this is slow but usually produces the best results. Ordered dither is a compromise between speed and quality; no dithering is fast but usually looks awful. Note that these switches have no effect unless color quantization is being done. Ordered dither is only available in __-onepass__ mode. __-map__ ''file'' Quantize to the colors used in the specified image file. This is useful for producing multiple files with identical color maps, or for forcing a predefined set of colors to be used. The ''file'' must be a GIF or PPM file. This option overrides __-colors__ and __-onepass__. __-nosmooth__ Use a faster, lower-quality upsampling routine. __-onepass__ Use one-pass instead of two-pass color quantization. The one-pass method is faster and needs less memory, but it produces a lower-quality image. __-onepass__ is ignored unless you also say __-colors__ ''N''. Also, the one-pass method is always used for gray-scale output (the two-pass method is no improvement then). __-maxmemory__ ''N'' Set limit for amount of memory to use in processing large images. Value is in thousands of bytes, or millions of bytes if -max 4m__ selects 4000000 bytes. If more space is needed, temporary files will be used. __-outfile__ ''name'' Send output image to the named file, not to standard output. __-verbose__ Enable debug printout. More __-v__'s give more output. Also, version information is printed at startup. __-debug__ Same as __-verbose__. !!EXAMPLES This example decompresses the JPEG file foo.jpg, quantizes it to 256 colors, and saves the output in 8-bit BMP format in foo.bmp: __djpeg -colors 256 -bmp__ ''foo.jpg'' ____ ''foo.bmp'' !!HINTS To get a quick preview of an image, use the __-grayscale__ and/or __-scale__ switches. __-grayscale -scale 1/8__ is the fastest case. Several options are available that trade off image quality to gain speed. __-fast__ turns on the recommended settings. __-dct fast__ and/or __-nosmooth__ gain speed at a small sacrifice in quality. When producing a color-quantized image, __-onepass -dither ordered__ is fast but much lower quality than the default behavior. __-dither none__ may give acceptable results in two-pass mode, but is seldom tolerable in one-pass mode. If you are fortunate enough to have very fast floating point hardware, __-dct float__ may be even faster than __-dct fast__. But on most machines __-dct float__ is slower than __-dct int__; in this case it is not worth using, because its theoretical accuracy advantage is too small to be significant in practice. !!ENVIRONMENT __JPEGMEM__ If this environment variable is set, its value is the default memory limit. The value is specified as described for the __-maxmemory__ switch. __JPEGMEM__ overrides the default value specified when the program was compiled, and itself is overridden by an explicit __-maxmemory__. !!SEE ALSO cjpeg(1), jpegtran(1), rdjpgcom(1), wrjpgcom(1)__ ppm__(5), pgm(5) Wallace, Gregory K. !!AUTHOR Independent JPEG Group !!BUGS Arithmetic coding is not supported for legal reasons. To avoid the Unisys LZW patent, __djpeg__ produces uncompressed GIF files. These are larger than they should be, but are readable by standard GIF decoders. Still not as fast as we'd like. ----
8 pages link to
djpeg(1)
:
webcollage(1)
Man1d
cjpeg(1)
jpegtran(1)
pnmtojpeg(1)
ppmtojpeg(1)
rdjpgcom(1)
wrjpgcom(1)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.