home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / gifsam23.zip / GIFSAMPL.TXT < prev    next >
Text File  |  1994-02-23  |  9KB  |  251 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. OVERVIEW
  7.  
  8. GIFSAMPL is a handy utility to produce sample collections of GIF files.  It
  9. may be used to produce preview images for downloading, or just to showcase
  10. a large collection.
  11.  
  12. Sample collections are GIF files that contain a number of other images on a
  13. single screen.  Each sampled image is shrunk to a consistent size,
  14. converted to a common color format, labeled, and stored with the others.
  15.  
  16. GIF is a graphics format created by CompuServe for storing bitmapped
  17. images, but you probably already knew that.  GIF and "Graphics Interchange
  18. Format" are trademarks (TM) of CompuServe Incorporated, an H&R Block
  19. Company.
  20.  
  21. GIFSAMPL was created in August 1991 by Mark S. Ransom.  Version 2.3 was
  22. created on February 23, 1994.
  23.  
  24.  
  25. ACKNOWLEDGMENTS
  26.  
  27. No achievement stands alone;  it rests on the achievements of others.  In
  28. this case, the relationship is a bit more direct.  This program was made
  29. possible by the direct incorporation of code and algorithms by other
  30. people.  I would like to acknowledge the following contributions, and thank
  31. the authors:
  32.  
  33. CLIPGIF by Steve Becquer.  GIFSAMPL actually started as modifications made
  34. to CLIPGIF.  Very little of the original remains;  however, I would have
  35. had no idea how to deal with a GIF file without it.
  36.  
  37. DECODER.C by Steven A. Bennett, based on work by Steve Wilhite.  This
  38. provides the GIF decompression function.
  39.  
  40. PICLAB by Lee Daniel Crocker and the Stone Soup Group.  The GIF compression
  41. function from this package was used.
  42.  
  43. "Digital Halftoning" by Robert Ulichney.  This book contains a description
  44. of the Floyd-Steinberg dithering algorithm, used in producing the color
  45. images.
  46.  
  47.  
  48. COMMAND LINE
  49.  
  50. The GIFSAMPL command line takes the following form:
  51.  
  52.      GIFSAMPL [drive:][path]outfile[.ext][ /option=value]
  53.  
  54. The first item is simply the name of the output file to create.  If the
  55. drive and path are not included, the current directory is used.  If an
  56. extension is not provided, .GIF will be used.
  57.  
  58. If the output file name ends with a number, GIFSAMPL can make more than one
  59. output file.  The number at the end of the filename will get incremented
  60. each time the old file fills up.  For example, if the filename is
  61.  
  62.  
  63.  
  64. SAMPLE01.GIF, the next file would be SAMPLE02.GIF, and so on up to
  65. SAMPLE99.GIF.
  66.  
  67. Options:  (default values are in parenthesis)
  68.  
  69.      /WIDTH=screen width  (640)
  70.  
  71. Sets the width of the output file.
  72.  
  73.      /HEIGHT=screen height  (480)
  74.  
  75. Sets the height of the output file.
  76.  
  77.      /ROWS=rows of samples per screen  (3)
  78.  
  79. Selects the number of samples to be included in each output file.  The
  80. screen will be divided into this many sections in both directions;  for the
  81. default value of 3, there will be 9 images in a single screen.
  82.  
  83.      /GREY=bits per pixel  (0)
  84.  
  85. This option selects grey-scale output, instead of color.  The number of
  86. bits per pixel determine how many shades of grey are created:  4 bits=16
  87. shades, 5 bits=32 shades, 6 bits=64 shades.  A value of 4 produces samples
  88. which can be viewed on all VGA displays;  6 is the maximum that can be
  89. displayed on most super-VGAs.  The value may be between 1 and 8.
  90.  
  91.      /SHARPEN
  92.  
  93. This option turns on a standard edge enhancement algorithm.  As an image is
  94. shrunk, much of the detail is lost.  The edge enhancement produces a
  95. sharper looking image, counteracting some of the loss.  The main drawback
  96. is a slight increase in processing time.
  97.  
  98.      /LUT=lut file name  (gifsampl.lut)
  99.  
  100. Specifies a Look-Up-Table (LUT) file for color conversion.  Two files are
  101. included in the distribution kit.  The default, gifsampl.lut, tries to
  102. treat all colors equally.  The second, skins.lut, is optimized for skin
  103. tones at the expense of the other colors.  The selection of a LUT will
  104. determine how grainy the samples look.  GIFSAMPL tries to look for this
  105. file in the current directory first, and then in the directory that
  106. GIFSAMPL was loaded from.
  107.  
  108.  
  109. INPUT FILES
  110.  
  111. GIFSAMPL reads a list of file names to get the files to sample.  The file
  112. names must be typed in, one at a time.  This can obviously be very time-
  113. consuming.
  114.  
  115. The input redirection features of DOS can be used to feed the filenames to
  116. GIFSAMPL.  If you have a list of files in a file called GIFLIST.TXT, for
  117. example, you would use the following command:
  118.  
  119.      gifsampl sample01.gif <giflist.txt
  120.  
  121.  
  122.  
  123.  
  124. If you want to sample all the files in the C:\GIFS directory, sorted by
  125. name, you could use:
  126.  
  127.      dir /w /on /b c:\gifs\*.gif | gifsampl sample01.gif
  128.  
  129. The options on the preceding DIR command only work under DOS 5.0 or better.
  130.  
  131.  
  132. GREY-SCALE
  133.  
  134. Why would anyone want to use grey scale?  Good question.
  135.  
  136. 4-bit grey-scale images can be displayed on ANY VGA adapter at 640x480
  137. resolution, even the original IBM and the cheapies.
  138.  
  139. Grey-scale files are smaller.  A 4-bit grey-scale file is about half the
  140. size of a color file.
  141.  
  142. The images can be sharper and free from dithering artifacts.  A 6-bit grey-
  143. scale image has a smoothness that enhances its realism.
  144.  
  145. GIFSAMPL needs less memory to produce grey-scale images.
  146.  
  147.  
  148. TEMP FILES
  149.  
  150. Normally, GIFSAMPL does not need to use any temporary files.  If you try to
  151. make sample images that are too large to fit in memory, GIFSAMPL will open
  152. a temporary file to store the excess.  If you have an environment variable
  153. called TEMP (most people do), the file will be opened there.  If not, it
  154. will be opened in the current directory.  The file will be deleted when
  155. GIFSAMPL is done.
  156.  
  157.  
  158. ASPECT RATIOS
  159.  
  160. This section is included for those not using Windows file viewers.  If you
  161. use Windows, your screen resolution and aspect ratio are fixed by your
  162. video drivers, and changing the file sizes created by GIFSAMPL won't
  163. matter.  All that will change is whether the result will fit on the screen
  164. or not.
  165.  
  166. What is an aspect ratio?  Technically speaking, the aspect ratio is the
  167. ratio of the picture width to the picture height.
  168.  
  169. An aspect ratio is a tricky thing.  If it is wrong, an image will look too
  170. squashed or too thin.  Why bring it up here?  Because GIFSAMPL may make
  171. files that are a different size than the ones you started with.  Some
  172. viewers will change your screen resolution to match the file you are
  173. viewing, and that could cause trouble.
  174.  
  175. The 640x480, 800x600, and 1024x768 resolutions produce nice square pixels
  176. on a properly adjusted standard monitor.  That's because the monitor screen
  177. is 4" wide for every 3" of height.  Some other resolutions are not so
  178. lucky.  The 640x350 EGA standard will look very squished if you don't use a
  179. proper video mode when displaying it.  If you use GIFSAMPL's default screen
  180.  
  181.  
  182.  
  183. size of 640x480, you won't get the proper mode.  Since these images are
  184. rare and/or ugly, my advice is to ignore them altogether.  If you must, use
  185. a screen size of 640x350.
  186.  
  187. A bigger problem is the 320x200 resolution.  These files are a little more
  188. common.  Luckily, they only look slightly squished.  You can ignore the
  189. problem, or try a 640x400 screen.  It probably won't work, because your
  190. viewer won't adjust to it, your VGA board won't support it, or your monitor
  191. will squish itself to compensate.  If you're really lucky, the 320x200
  192. files were created with the wrong aspect ratio in the first place, and will
  193. be restored to their proper form when sampled.  Sometimes two wrongs DO
  194. make a right!
  195.  
  196.  
  197. PROBLEM SOLVING
  198.  
  199.   My GIF viewer only displays one image per screen.
  200.  
  201. The GIF standard allows multiple separate images per file.  However, it
  202. never clearly states what you should do if you find more than one.  Since
  203. GIFSAMPL turns each sample into a separate image, it is dependent on the
  204. good nature of whoever created your viewer to create the proper effect.  I
  205. only have experience with two viewers;  one works fine, and the other one
  206. doesn't.  The one that works is VPIC by Bob Montgomery.
  207.  
  208.   I keep running out of memory.
  209.  
  210. GIFSAMPL stores the sample image in memory as it reads the input GIF file.
  211. If the image won't fit, it will try to store some of it in a temporary
  212. file.  Some memory is always needed, though.  There are three things you
  213. can do to use less memory:
  214.  
  215.      Make the screen size smaller.  (Change the /WIDTH and /HEIGHT
  216.      options).
  217.  
  218.      Put more samples on a screen.  (Change the /ROWS option).
  219.  
  220.      Use grey-scale instead of color.  (Use the /GREY option).
  221.  
  222.  
  223. KNOWN BUGS
  224.  
  225. Only the GIF87a format is understood.  I have not checked any newer formats
  226. to see if there are any incompatibilities.
  227.  
  228.  
  229. FUTURE ENHANCEMENTS
  230.  
  231. The following enhancements are planned for future versions:
  232.  
  233. A user interface.  The current means of selecting files and options is from
  234. the Dark Ages.  If you grew up in the Dark Ages like I did, don't worry;
  235. the command line will be retained.
  236.  
  237. 15-bit and 24-bit output options, for better color output.
  238.  
  239.  
  240.  
  241.  
  242. Output files that are a single combined image, instead of a lot of little
  243. images on a single screen.  This should make them compatible with all GIF
  244. viewers.
  245.  
  246. Options for sorting the file list, and disabling portions of the image
  247. label.
  248.  
  249. A background image option to fill out any unused space on the screen.  This
  250. may be used as advertising space.
  251.