home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / GRAPHICS / jpegsrc.v3.lzh / cjpeg.1 < prev    next >
Text File  |  1992-07-02  |  4KB  |  145 lines

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