home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / pc / 0600 / CCE_0697.ZIP / CCE_0697.PD / JPEGV218 / JPEG.TXT next >
Text File  |  1994-01-16  |  6KB  |  107 lines

  1. Instructions and recommendations for the use of JPEG compression -
  2. modified by D.R.Oldcorn of Volume 11 Software Development from that
  3. provided with the Independent JPEG Group's source code version 4.
  4.  
  5.  
  6. INTRODUCTION
  7.  
  8. This distribution contains software to implement JPEG image compression and
  9. decompression.  JPEG (pronounced "jay-peg") is a standardized compression
  10. method for full-color and gray-scale images.  JPEG is designed to handle
  11. "real-world" scenes, for example scanned photographs.  Cartoons, line
  12. drawings, and other non-realistic images are not JPEG's strong suit; on this
  13. sort of material you may get poor image quality and/or little compression.
  14.  
  15. JPEG is lossy, meaning that the output image is not necessarily identical to
  16. the input image.  Hence you should not use JPEG if you have to have identical
  17. output bits.  However, on typical real-world images, very good compression
  18. levels can be obtained with no visible change, and amazingly high compression
  19. is possible if you can tolerate a low-quality image.  You can trade off image
  20. quality against file size by adjusting the compressor's "quality" setting.
  21.  
  22.  
  23. COMPRESSION OPTIONS
  24.  
  25.  
  26. Quality Factor - Scale quantization tables to adjust image quality.
  27.      Quality is 0 (worst) to 100 (best); default is 75.
  28.     (See below for more info.)
  29.  
  30. Greyscale - Create monochrome JPEG file from color input. The software
  31.     doesn't know if an image only uses grey shades, so this can be
  32.     used to force a greyscale output.
  33.  
  34. Optimize - Perform optimization of entropy encoding parameters.
  35.     Without this, default encoding parameters are used. Optimize makes
  36.     the JPEG file a little smaller, but compression is a little slower
  37.     and needs more memory and / or a swapfile.  Image quality and speed
  38.     of decompression are unaffected by optimisation.
  39.  
  40. Note that although output is onto the 16-bit Truecolour mode of the Falcon,
  41. all calculations are performed at 24-bit resolution. The DSP code is
  42. very very slightly less accurate than the 030 code, equivalent to about
  43. 1 part in 768. All output and recompression (Targa/JFIF) is done in
  44. full 24 bit colour.
  45.  
  46. The quality option lets you trade off compressed file size against quality of
  47. the reconstructed image: the higher the quality setting, the larger the JPEG
  48. file, and the closer the output image will be to the original input.  Normally
  49. you want to use the lowest quality setting (smallest file) that decompresses
  50. into something visually indistinguishable from the original image.  For this
  51. purpose the quality setting should be between 50 and 95; the default of 75 is
  52. usually about right.  If you see defects at quality 75, then go up 5 or 10
  53. counts at a time until you are happy with the output image.  (The optimal
  54. setting will vary from one image to another.)
  55.  
  56. For 24-bit colour input images, it is rare that quality factors above 75
  57. will be required - filesize increases quite significantly for extremely
  58. small improvements in appearance. An IMPORTANT thing to remember is that
  59. on the Falcon you 1) are viewing images in only 16-bit colour, which may
  60. not necessarily let you see all the low-level artifacts - although these
  61. are unlikely to be too bad - and 2) if you view the image in interlace
  62. modes it eliminates the vast majority of artifacts due to the natural
  63. aliasing effect of interlace, so always check your images using a fixed
  64. non-interlaced mode.
  65.  
  66. Quality 100 will generate a quantization table of all 1's, eliminating loss
  67. in the quantization step (but there is still information loss in subsampling,
  68. as well as roundoff error).  This setting is mainly of interest for
  69. experimental purposes.  Quality values above about 95 are NOT recommended for
  70. normal use; the compressed file size goes up dramatically for hardly any gain
  71. in output image quality.
  72.  
  73. In the other direction, quality values below 50 will produce very small files
  74. of low image quality, although depending on the image the quality can still be
  75. acceptable for many purposes even at around 25-30.  Settings around 5 to 10
  76. might be useful in preparing an index of a large image library, for example.
  77. Try -quality 2 (or so) for some amusing Cubist effects.  (Note: quality values
  78. below about 25 generate 2-byte quantization tables, which are considered
  79. optional in the JPEG standard).
  80.  
  81. Restart markers are not available in this implementation, and sampling
  82. ratios are fixed at 2x2 1x1 1x1.
  83.  
  84.  
  85.  
  86. HINTS
  87.  
  88. Color GIF files are not the ideal input for JPEG; JPEG is really intended for
  89. compressing full-color (24-bit) images.  In particular, don't try to convert
  90. cartoons, line drawings, and other images that have only a few distinct
  91. colors.  GIF works great on these, JPEG does not. JPEG artifacts and
  92. colour quantisation have BAD effects when mixed together... colourmapped
  93. images will usually be larger and of poorer quality than a 24-bit colour
  94. input.
  95.  
  96. Avoid running an image through a series of JPEG compression/decompression
  97. cycles.  Image quality loss will accumulate; after ten or so cycles the image
  98. may be noticeably worse than it was after one cycle.  It's best to use a
  99. lossless format while manipulating an image, then convert to JPEG format when
  100. you are ready to file the image away.
  101.  
  102. The optimize option is worth using when you are making a "final" version
  103. for posting or archiving.  It's also a win when you are using low quality
  104. settings to make very small JPEG files; the percentage improvement is
  105. often a lot more than it is on larger files.
  106.  
  107. ə