Section: User Commands (1)
Updated: 18 January 2013
djpeg [ options ] [ filename ]
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.)
All switch names may be abbreviated; for example, -grayscale may be written -gray or -gr. Most of the "basic" switches can be abbreviated to as little as one letter. Upper and lower case are equivalent (thus -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:
Switches for advanced users:
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:
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.
Independent JPEG Group
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.
Tutoriais de Tecnologia Web