home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / jpeg5 / bin / cjpeg.man next >
Text File  |  1994-08-08  |  5KB  |  133 lines

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