home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / TGAUTL.ZIP / TGAUTILS.DOC < prev    next >
Text File  |  1990-03-26  |  8KB  |  164 lines

  1. TRUEVISION TGA(tm) UTILITIES PACKAGE - March 26, 1990
  2.  
  3.  
  4. The TGA Utilities Package contains three separate programs that can be
  5. used to manipulate image files that have been saved in the Truevsion
  6. TGA format.  This format is documented in the Truevision TGA File
  7. Format Specification Version 2.0 and is available from Truevision, Inc.
  8.  
  9. The three programs provided are:
  10.  
  11.     TGADUMP.EXE -    displays on the console device a description of the
  12.             various fields contained in a Truevision TGA file.
  13.     
  14.     TGAEDIT.EXE -    provides the ability to examine and modify the
  15.             contents of various control and informational fields
  16.             within a TGA file.  Can also be used to convert an
  17.             old style TGA file into the new extended TGA file
  18.             format.
  19.  
  20.     TGAPACK.EXE -    can be used to convert an uncompressed image file
  21.             into a run length compressed image file, and vice
  22.             versa.  Also provides an option to convert a 32
  23.             bit uncompressed image into a 24 bit uncompressed
  24.             image by deleting alpha channel data.
  25.  
  26.  
  27. TGADUMP takes an optional filename as an argument.  If the filename
  28. does not include an extension, TGADUMP will search for file with the
  29. base name specified, and one of the extensions: ".TGA", ".VST", ".ICB",
  30. ".VDA", or ".WIN".  If the command is executed without an argument,
  31. the program will prompt for a filename.  TGADUMP does not modify the
  32. contents of a TGA file, but provides a means to identify various
  33. characteristics of a TGA file without the necessity of a TARGA or ATVISTA
  34. videographics adapter.
  35.  
  36. TGAEDIT was designed to convert an image file from the original TGA format
  37. into the extended TGA format.  TGAEDIT accepts one or more filenames as
  38. arguments, and will search for default extensions in a manner similar to
  39. TGADUMP.  If more than one filename is provided as arguments, TGAEDIT will
  40. process each in sequence.  By default, TGAEDIT will display the contents of
  41. informational fields found in the input file, and will prompt the user for
  42. any changes desired.  Simply entering RETURN or ESC at each prompt will leave
  43. the value of the field unchanged.  The output file created will be in the
  44. extended TGA format, and by default, will contain a 64x64 postage stamp.
  45. Various options are available with TGAEDIT to modify this default
  46. behavior.  If the -noprompt option is provided, TGAEDIT will process the
  47. file converting it to the extended format without prompting the user
  48. for field values.  If the -noextend option is provided, the program will
  49. convert an extended TGA file back to an original TGA format.  Various
  50. other fields of the extended TGA file are copied to the output file by
  51. default, but this behavior can be suppressed by providing one of the 
  52. following options:
  53.  
  54.     -nocolor omits the color correction table from the output file
  55.     -noscan omits the scan line table from the output file
  56.     -nodev omits the developer area from the output file
  57.     -nostamp omits the postage stamp from the output file
  58.  
  59. Many of the control fields designating the size of the image and the pixel
  60. depth are not readily available for editing since changing these values
  61. would change the interpretation of the image data.  The ability to edit
  62. these fields is provided; however, by specifying the -all option.  If an
  63. option is provided that is not understood, the program displays the legal
  64. options; therefore, executing the command:
  65.  
  66.     TGAEDIT -help
  67.  
  68. will result in a display of the recognized options.
  69.  
  70. The TGAPACK program can be used to process original TGA image files.
  71. This program was written to address a potential problem with run length
  72. encoded images that were created relative to the original TGA specification.
  73. In that specification, run length packets and raw packets could contain
  74. data that actually wrapped from one edge of the image to the other.  This
  75. characteristic is not allowed under the new TGA specification.  Packets in
  76. a run length encoded file must end with the last pixel of a scan line.  This
  77. is necessary to support features such as the scan line table.  There then
  78. needs to exist a way to convert a run length encoded file saved under the
  79. less restrictive characteristics of the original TGA specification into
  80. a run length encoded image under the current TGA specification.  TGAPACK
  81. can be used to accomplish this by first uncompressing the image data, and
  82. then processing the image file a second time, but requesting that the data
  83. be compressed.  As with TGAEDIT, TGAPACK accepts one or more filenames as
  84. arguments, and it will search for various extensions if they are not
  85. provided with the filename.  If the -unpack option is specified, TGAPACK
  86. with uncompress a compressed image file.  If no option is specified, the
  87. program will convert an uncompressed image file into a compressed image file.
  88. TGAPACK also provides one other option for use with uncompressed 32 bit
  89. per pixel images.  When the -32to24 option is specified, TGAPACK will
  90. process the image data stripping out the alpha data, thus converting the
  91. file to a 24 bit per pixel TGA file.  As with TGAEDIT, if an unknown option
  92. is provided, a summary of the options is displayed on the console.
  93.  
  94. As an example of how these utilities can be used together, suppose we
  95. had an original 32 bit compressed TGA file named IMAGE.TGA that we wanted to
  96. convert to the extended format and include a postage stamp.  The following
  97. command might perform this operation satisfactorily:
  98.  
  99.     TGAEDIT -noprompt image
  100.  
  101. If successful, the resulting file named IMAGE.TGA will be a 32 bit compressed
  102. image in the extended format, and will include a postage stamp.  The original
  103. file is deleted if the conversion is successful (i.e., the output file
  104. replaces the input file).  If a problem occurred during the processing
  105. (e.g., the run length encoding did not conform to the new specification),
  106. the original file is preserved and an error message is displayed.  At this
  107. point, we would need to recompress the file to conform to the current
  108. specification.  This is accomplished by the following commands:
  109.  
  110.     TGAPACK -unpack image
  111.     TGAPACK image
  112.  
  113. The newly compressed file can now be processed by TGAEDIT to create the
  114. proper postage stamp entry and convert the file to the extended format.
  115. If we had wanted to remove the alpha data from the image and create a
  116. 24 bit per pixel TGA file, we needed to process the file one more time
  117. using TGAPACK:
  118.  
  119.     TGAPACK -unpack image
  120.     TGAPACK -32to24 image
  121.     TGAPACK image
  122.     TGAEDIT -noprompt image
  123.  
  124. Of course, if we had wanted to examine the effects of these changes at
  125. any point in the process, all we needed to do is examine the file control
  126. information using TGADUMP.
  127.  
  128.  
  129. Two additional utilities are provided to allow the display of postage
  130. stamp data on an ATVista or on a TARGA.
  131.  
  132. TSTAMP        - TARGA Stamp displays postage stamp on Truevision TARGA.
  133.           The program loads data directly from the file with no data
  134.           padding, so that 16-bit TGA files are displayed on a Targa16,
  135.           24-bit TGA files will be displayed on a Targa24, etc.
  136.           The source code is provided, and requires the TARGA Tools
  137.           version 4.0 to be rebuilt.  Note that the function
  138.           UnPackBu will need to be changed from the 4.0 version.
  139.           Refer to the comments in the TSTAMP program.
  140.  
  141. VSTAMP        - ATVista Stamp displays postage stamp on Truevision ATVista.
  142.           This program is based on the Truevision STAGE Toolkit, and
  143.           requires the STAGE driver and server files distributed with
  144.           the ATVista Demo Disk version 2.0.  You must have the STAGE
  145.           Toolkit version 2.0 to rebuild this program.
  146.  
  147. Additional files provided with this package are sample image files that have
  148. been created with various pixel depths in both uncompressed and compressed
  149. formats.  Some of the file names and associated descriptions are as follows:
  150.  
  151.     UCM8.TGA    - Uncompressed color mapped 8 bit image
  152.     CCM8.TGA    - Compressed color mapped 8 bit image
  153.     UBW8.TGA    - Uncompressed black & white 8 bit image
  154.     CBW8.TGA    - Compressed black & white 8 bit image
  155.     UTC16.TGA    - Uncompressed True Color 16 bit image
  156.     CTC16.TGA    - Compressed True Color 16 bit image
  157.     UTC24.TGA    - Uncompressed True Color 24 bit image
  158.     CTC24.TGA    - Compressed True Color 24 bit image
  159.     UTC32.TGA    - Uncompressed True Color 32 bit image
  160.     CTC32.TGA    - Compressed True Color 32 bit image
  161.  
  162.  
  163. Truevision Software Development Team
  164.