home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / giflib11 / doc / gif2bgi.doc < prev    next >
Encoding:
Text File  |  1990-08-22  |  3.3 KB  |  86 lines

  1.             Gif2BGI
  2.             --------
  3.  
  4. Program to display images saved as GIF files on IBM PC display devices using
  5. the BGI (Borland) driver interface.
  6.  
  7.   The program has few stages as follows:
  8. 1. Reads GIF file header and determines size of it.
  9. 2. Dynamically allocate enough memory to hold all the image internally.
  10.    One byte per pixel is always allocated, so a little bit more than
  11.    width*height (of screen, not image) bytes are required.
  12. 3. Reads all the image in. Interlaced images are read correctly in, although
  13.    they are displayed sequentially.
  14. 4. Display first image using the defaults as set by the command line option.
  15. 5. Goes to interactive mode. For full description of the interactive mode
  16.    see below
  17.  
  18.  
  19. Usage:
  20. ------
  21.  
  22. Gif2BGI [-d BGI Directory] [-u UserBGIDrv.Mode] [-z ZoomFactor] [-b]
  23.                                 [-h] GifFile
  24.  
  25. If no GifFile is given, Gif2BGI will try to read stdin for GIF file.
  26.  
  27.  
  28. Memory required:
  29. ----------------
  30.  
  31. Screen.
  32.  
  33.  
  34. Options:
  35. --------
  36.  
  37. 1. [-d BGI Directory] : Where should we look for default drivers (as supplied
  38.    by Borland). For example '-d c:/tc/bgi'.
  39. 2. [-u UserBGIDrv.Mode] : Specifies user defined BGI driver. If for example
  40.    you have a BGI driver for your special vga called MYVGA.BGI and you want
  41.    to run it in mode 2 then type '-u c:/tc/bgi/myvga.2'. Note the absolute
  42.    path to the driver must be specified. Also note that we use '/' and not
  43.    '\' so they would not be treated as options.
  44. 3. [-z ZoomFactor] : Sets zoom factor of the image. Zoom factor should be
  45.    power of 2 up to 256. Default is 1 (no zoom).
  46. 7. [-h] : print one command line help, similar to Usage above.
  47.  
  48. Interactive mode:
  49. -----------------
  50.  
  51.   Once the image is displayed, the program goes into interactive mode
  52. which recognizes the following commands:
  53. 1. C - get Color and Position.
  54.      In this sub menu, a cursor appears, and the Color of the pixel the cursor
  55.    is on, with its position in GIF file screen are printed. The 4 arrows may
  56.    be used (shifted for faster movement) to move the cursor. Any other key will
  57.    abort this sub mode.
  58. 2. D - Zoom Down by factor of 2 unless current zoom factor is 1.
  59. 3. R - Redraw the image.
  60. 4. S - print Status of image and program.
  61. 5. U - Zoom Up by factor of 2 unless current zoom factor is 256.
  62. 6. 4 arrow keys can be used to pan to the desire direction, if the image
  63.    overflow to that direction. If, on the other hand, the image fit into the
  64.    Hercules device, arrow keys are ignored. The panning steps are 1/2 screen if
  65.    not on image end.
  66. 7. ' ' - Space bar may be used to abort current image drawing.
  67. 8. ESC - Escape key may be used to abort the program.
  68.  
  69.  
  70. Notes:
  71. ------
  72.  
  73.   As no color quantization is used in this program if a GIF image has more
  74. colors than the BGI driver support, this program will abort.
  75.   This driver is optimized for drivers with one byte per pixel (256 colors)
  76. and will run MUCH faster in these cases.
  77.  
  78.  
  79. Bugs:
  80. -----
  81.  
  82.   For some reason I could not figure out on my ATI wonder card, int 10h call
  83. 10h (AH = AL = 10h) to set the color registers sometimes result with wrong
  84. colors. Direct access of the card registers gives correct results. I dont do
  85. that to make this program portable but if your driver gives wrong colors it
  86. is probably because it is using this bios call. Any one has anything to add?