home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / jpeg20 / cjpeg.man < prev    next >
Encoding:
Text File  |  1992-02-12  |  3.5 KB  |  96 lines

  1. CJPEG 1 "11 December 1991"
  2.  
  3. cjpeg - compress an image file to a JPEG file
  4.  
  5. SYNOPSIS
  6. cjpeg [-Q " quality"] [-oTIad] [filename]
  7.  
  8. DESCRIPTION
  9.  
  10. cjpeg compresses the named image file, or the standard input if no file is
  11. named, and produces a JPEG/JFIF file on the standard output.
  12. The currently supported image file formats are: PPM (PBMPLUS color
  13. format), PGM (PBMPLUS gray-scale format), GIF, Targa, and RLE (Utah Raster
  14. Toolkit format).  (RLE is supported only if the URT library is available.)
  15.  
  16. OPTIONS
  17.  
  18. -Q " quality"
  19. Scale quantization tables to adjust image quality.  Quality is 0 (worst) to
  20. 100 (best); default is 75.  (See below for more info.)
  21.  
  22. -o
  23. Perform optimization of entropy encoding parameters.  Without this, default
  24. encoding parameters are used.
  25. -o usually makes the JPEG file a little smaller, but cjpeg runs much slower.
  26. Image quality and speed of decompression are unaffected by -o.
  27.  
  28. -T
  29. Input file is Targa format.  Targa files that contain an "identification"
  30. field will not be automatically recognized by cjpeg; for such files you must
  31. specify -T to force cjpeg to treat the input as Targa format.
  32.  
  33. -I
  34. Generate noninterleaved JPEG file (not yet supported).
  35.  
  36. -a
  37. Use arithmetic coding rather than Huffman coding (not currently
  38. supported for legal reasons).
  39.  
  40. -d
  41. Enable debug printout.  More -d's give more output.  Also, version
  42. information is printed at startup.
  43.  
  44. The -Q switch lets you trade off compressed file size against quality of the
  45. reconstructed image: the higher the -Q setting, the larger the JPEG file,
  46. and the closer the output image will be to the original input.  Normally you
  47. want to use the lowest -Q setting (smallest file) that decompresses into
  48. something visually indistinguishable from the original image.  For this
  49. purpose the -Q setting should be between 50 and 95; the default of 75 is
  50. often about right.
  51. If you see defects at -Q 75, then go up 5 or 10 counts at a time until you
  52. are happy with the output image.  (The optimal setting will vary from one
  53. image to another.)
  54.  
  55. -Q 100 will generate a quantization table of all 1's, eliminating loss in
  56. the quantization step (but there is still information loss in subsampling,
  57. as well as roundoff error).  This setting is mainly of interest for
  58. experimental purposes.
  59.  
  60. -Q values above about 95 are not recommended for normal use; the compressed
  61. file size goes up dramatically for hardly any gain in output image quality.
  62.  
  63. In the other direction, -Q values below 50 will produce very small files
  64. of low image quality.  Settings around 5 to 10 might be useful in preparing
  65. an index of a large image library, for example.  Try -Q 2 (or so) for some
  66. amusing Cubist effects.  (Note: -Q values below about 25 generate 2-byte
  67. quantization tables, which are considered optional in the JPEG standard.
  68. cjpeg emits a warning message when you give such a -Q value, because some
  69. commercial JPEG programs may be unable to decode the resulting file.)
  70.  
  71. EXAMPLES
  72.  
  73. This example compresses the PPM file foo.ppm with a quality factor of
  74. 60 and saves the output as foo.jpg:
  75.  
  76.                cjpeg -Q foo.ppm >foo.jpg
  77.  
  78. SEE ALSO
  79. djpeg (1)
  80.  
  81. Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
  82. Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
  83.  
  84. AUTHOR
  85. Independent JPEG Group
  86.  
  87. BUGS
  88. Arithmetic coding and interleaved output not yet supported.
  89.  
  90. Not all variants of Targa file format are supported.
  91.  
  92. The -T switch is not a bug, it's a feature.  (It would be a bug if the
  93. Targa format designers had not been clueless.)
  94.  
  95. Not as fast as we'd like.
  96.