home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / grphutil / leadjpeg.arj / COMPRESS.TXT next >
Encoding:
Text File  |  1992-05-18  |  7.5 KB  |  142 lines

  1. File: compress.txt
  2. Date: 04/06/92
  3.  
  4. LEADTOOLS Supported File Formats:
  5. ---------------------------------
  6.                                                                 
  7. -------------------------------------------------------------------------
  8. |   File    |      Bits     |     Compression      |   QFactor       |
  9. |  Format   |    Supported  |       Format         |  Supported         |
  10. -------------------------------------------------------------------------
  11. |   JFF     |      24       |       JPEG &         |   2 - 255        |
  12. |        |            |      LEAD-JFF       |             |
  13. -------------------------------------------------------------------------
  14. |   JTF     |      24       |       JPEG &         |   2 - 255       |
  15. |        |            |       LEAD-JTF       |             |                     
  16. -------------------------------------------------------------------------
  17. |   CMP     |      24       |       LEAD           |   2 - 255       |
  18. |        |            |               | & Enhanced      |
  19. |        |            |               | PQ or PQ1, QMS, QS    |
  20. |        |            |               | SQS, SQT, MCQ, MC     |
  21. -------------------------------------------------------------------------
  22. |   TGA     | 8, 16, 24, 32 |    uncompressed      |                   |
  23. |           |               |      & RLE           |                |
  24. -------------------------------------------------------------------------
  25. |   TIF     |  1, 4, 8, 16  |    uncompressed      |                 |
  26. |           |               |      & LZW           |                 |
  27. -------------------------------------------------------------------------
  28. |   BMP     |   4, 8, 24    |    uncompressed,     |                 |
  29. |           |               |   Windows, RLE, &    |                 |
  30. |        |            | Presentation Manager |             |
  31. -------------------------------------------------------------------------
  32. |   PCX     |   1, 4, 8     |    compressed        |                 |
  33. -------------------------------------------------------------------------
  34. |   GIF     |   1, 4, 8     |       LZW            |                 |
  35. -------------------------------------------------------------------------
  36.  
  37. LEAD Technologies is always adding new file support to all products.
  38. Please contact LEAD for availability of new versions of LEADTOOLS that
  39. will support new file formats.
  40.  
  41. JPEG and LEAD-JPEG
  42. ------------------
  43. LEADTOOLS supports two formats of JTIF(JPEG TIF) and two formats of 
  44. JFIF(JPEG File Interchange format). Discusion here applies to either formats.
  45. LEADTOOLS can store two versions of JFIF file and two versions of JTIF
  46. file. One version is the orginal generic JPEG streem format. The second 
  47. version contains addtional color space conversion to produce smaller file
  48. size. Both are still JPEG complient file formats.  
  49. LEADTOOLS's JPEG formats are JFIF, LEADJFIF, JTIF, and LEADJTIF.
  50. The new additions are LEADJFIF and LEADJTIF and are both fully compatable 
  51. with most commercial JPEG viewers. The advantage of using LEAD-JFIF
  52. and LEAD-JTIF is to produce a smaller compressed file size.
  53.  
  54.  
  55. LEAD Conversion and Compression Process
  56. ---------------------------------------
  57. In compliance to JPEG specifications, the LEADTOOLS compression will 
  58. take an image to 24-bit per pixel regardless of the original bits per pixel. 
  59. For example, if you try to compress an 8-bit image to a LEAD, LEADJFIF, JFIF,
  60. LEADJTIF or JTIF formats, LEADTOOLS will first convert the image to 24-bits
  61. per pixel before starting the compression process.
  62.  
  63. A 24-bit TGA file is the fastest format    for LEADTOOLS to compress and
  64. decompress. Compressing a 16-bit TGA file is also a fast conversion process 
  65. for LEADTOOLS. When you compress an image in the LEAD format, you can store 
  66. the palette to get the best colors for the 8-bit VGA screen. Also, when 
  67. displaying the image to a 24-bit display device, the palette is ignored and 
  68. the original 24-bit color information will be displayed. When displaying to
  69. an 8-bit VGA screen, LEADTOOLS will use this palette to get the best 
  70. 256 colors to display the file.
  71.  
  72. When compressing to a CMP format, use the pre-defined QMS (Quality More
  73. Important that Size) option. For JFF or JTF format, start with a QFactor
  74. of 30 and work up or down until you get the desired result. The CMP format 
  75. will give you better image quality and a smaller file size than JFF or JTF.
  76.  
  77. Decompression
  78. -------------
  79. LEADTOOLS decompresses the quickest to 16-, 24-, or 32-bit file
  80. formats.  When decompressing to an 8-bit file, LEADTOOLS must go through an 
  81. optimization process to obtain the best 256 colors for the image. This will
  82. slow the decompression process.
  83.  
  84. When LEADTOOLS decompresses a file, it will first decompress to a 24-bit RGB 
  85. format and then convert the file to the desired format (GIF, TIFF, etc). 
  86.  
  87. If only and 8-bit color VGA is used for displaying images, we recommend 
  88. you store the VGA palette with the image. By doing so, LEADTOOLS will not 
  89. have to create a new palette every time the image is displayed to the 8 bit 
  90. VGA screen. This process is called optimization. By saving the palette with 
  91. the image, the file will be 796 bytes larger than saving it without the 
  92. palette optimization; but having saved the palette, the decompression to an 
  93. 8-bit VGA will be much faster.
  94.  
  95.  
  96. Alpha Channel
  97. -------------
  98. The Alpha Channel is the 8-bit portion of a 32-bit TGA file that defines 
  99. the blend and the overlay. The alpha channel is stored with the 
  100. associated compressed file name. The alpha channel will have the same 
  101. filename as the compressed file but with the .ALF extension.
  102.  
  103. You can have the same alpha channel name associated with a different TGA 
  104. file by renaming or copying the .ALF file as the same compressed file name
  105. (e.g. MYFILE.CMP and MYFILE.ALF).
  106.  
  107. If you decompress the image back to a 32-bit TGA file and want to restore the
  108. alpha channel, make sure both files are in the same directory. If the .ALF
  109. file is not present, LEADTOOLS will fill the alpha channel with zeroes.
  110.  
  111. If you have no use for the blend or overlay capability, do not save the
  112. alpha channel; not saving the alpha channel will have no affect on the 
  113. image quality.
  114.  
  115.  
  116. When To Save the VGA Palette with LEAD compressed file format.
  117. ---------------------------------------------------------------
  118. If your applications are only for 8 bit color VGA users or both 8-bit color
  119. and higher, we recommend that you save the VGA palette along with the 
  120. compressed file. By doing so, LEADTOOLS will not have to create and optimize 
  121. a new palette table every time the file is displayed. This avoids adding 
  122. time to the decompression process while a new palette is created every time
  123. the file is decompressed or displayed. Actual time taken also varies 
  124. according to the image size. However, decompressing to the VGA screen will
  125. be faster if palette was created and stored in the compressed file. Sice most
  126. files are decompressed more times than compressed adding the time to the
  127. compression process and saving the palette is more productive than saving
  128. time during compression and not saving the VGA palette but creating one
  129. every time the file is viewd.
  130.  
  131.  
  132. File Format Conversion
  133. ----------------------
  134. LEADTOOLS gives you the ability to convert to and from many graphics 
  135. file formats. Keep in mind that when you convert a 32-bit or 24-bit file 
  136. downto a 16-bit or lower, you will loose color in the conversion 
  137. process because there are less available colors. As a result, the colors in 
  138. the newly converted file will not be exactly the same as the original 
  139. 24-bit or 32-bit. LEADTOOLS does try to optimizes the colors during the 
  140. conversion process but some loss of color is unavoidable.
  141.  
  142.