Thomas G. Lane | bd543f0 | 1991-12-13 00:00:00 +0000 | [diff] [blame^] | 1 | .TH DJPEG 1 "11 December 1991" |
| 2 | .SH NAME |
| 3 | djpeg \- decompress a JPEG file to an image file |
| 4 | .SH SYNOPSIS |
| 5 | .B djpeg |
| 6 | [ |
| 7 | .B \-GPRTbgD2d |
| 8 | ] |
| 9 | [ |
| 10 | .BI \-q " N" |
| 11 | ] |
| 12 | [ |
| 13 | .I filename |
| 14 | ] |
| 15 | .LP |
| 16 | .SH DESCRIPTION |
| 17 | .LP |
| 18 | .B djpeg |
| 19 | decompresses the named JPEG file, or the standard input if no file is named, |
| 20 | and produces an image file on the standard output. PPM, GIF, Targa, or RLE |
| 21 | output format can be selected. (RLE is supported only if the URT library is |
| 22 | available.) |
| 23 | .LP |
| 24 | The color quantization algorithm is currently shoddy. Because of this, the |
| 25 | GIF output mode is not recommended in the current release, except for |
| 26 | gray-scale output (obtained with |
| 27 | .BR \-g ). |
| 28 | .SH OPTIONS |
| 29 | .TP |
| 30 | .B \-G |
| 31 | Select GIF output format (implies |
| 32 | .BR \-q , |
| 33 | with default of 256 colors). |
| 34 | Currently the color quantization uses a shoddy algorithm and external |
| 35 | quantization (e.g. |
| 36 | .IR ppmquant , |
| 37 | .IR rlequant ) |
| 38 | is recommended before conversion to GIF format. |
| 39 | .TP |
| 40 | .B \-P |
| 41 | Select PPM or PGM output format (this is the default). PGM is emitted if the |
| 42 | JPEG file is gray-scale or if |
| 43 | .B \-g |
| 44 | is specified. |
| 45 | .TP |
| 46 | .B \-R |
| 47 | Select RLE output format. Requires URT library. |
| 48 | .TP |
| 49 | .B \-T |
| 50 | Select Targa output format. Gray-scale format is emitted if the JPEG file is |
| 51 | gray-scale or if |
| 52 | .B \-g |
| 53 | is specified; otherwise, colormapped format is emitted if |
| 54 | .B \-q |
| 55 | is specified; otherwise, 24-bit full-color format is emitted. |
| 56 | .TP |
| 57 | .B \-b |
| 58 | Perform cross-block smoothing. This is quite memory-intensive and only seems |
| 59 | to improve the image at low quality settings (\fB\-Q\fR 10 to 20 or so). |
| 60 | At normal |
| 61 | .B \-Q |
| 62 | settings it may make the image worse. |
| 63 | .TP |
| 64 | .B \-g |
| 65 | Force gray-scale output even if input is color. |
| 66 | .TP |
| 67 | .BI \-q " N" |
| 68 | Quantize to N colors. |
| 69 | .TP |
| 70 | .B \-D |
| 71 | Do not use dithering in color quantization. By default, Floyd-Steinberg |
| 72 | dithering is applied when quantizing colors, but on some images dithering may |
| 73 | result in objectionable "graininess". If that happens, you can turn off |
| 74 | dithering with |
| 75 | .BR \-D . |
| 76 | .TP |
| 77 | .B \-2 |
| 78 | Use two-pass color quantization (not yet supported). |
| 79 | .TP |
| 80 | .B \-d |
| 81 | Enable debug printout. More |
| 82 | .BR \-d 's |
| 83 | give more output. Also, version information is printed at startup. |
| 84 | .SH EXAMPLES |
| 85 | .LP |
| 86 | This example decompresses the JPEG file foo.jpg and saves the output |
| 87 | as a gray-scale image in foo.pgm: |
| 88 | .IP |
| 89 | .B djpeg \-g |
| 90 | .I foo.jpg |
| 91 | .B > |
| 92 | .I foo.pgm |
| 93 | .SH SEE ALSO |
| 94 | .BR cjpeg (1) |
| 95 | .br |
| 96 | .BR ppmquant (1) |
| 97 | [From the PBMplus distribution] |
| 98 | .br |
| 99 | .BR rlequant (1) |
| 100 | [From the Utah Raster Toolkit distribution] |
| 101 | .br |
| 102 | Wallace, Gregory K. "The JPEG Still Picture Compression Standard", |
| 103 | Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. |
| 104 | .SH AUTHOR |
| 105 | Independent JPEG Group |
| 106 | .SH BUGS |
| 107 | .B djpeg |
| 108 | currently uses a shoddy color quantization algorithm. This leads to |
| 109 | poor GIF file output. Two-pass color quantization is not yet |
| 110 | supported. |
| 111 | .PP |
| 112 | Arithmetic coding is not supported for legal reasons. |
| 113 | .PP |
| 114 | Not as fast as we'd like. |