CCL Home Page
Up Directory CCL vgif.doc
VGIF.EXE ver 3.4 by Bob Montgomery [CIS 73357,3140]           6-23-88
See revision history for new items. Now supports standard VGA and Orchid
extended VGA. An attempt at supporting other VGA cards is made; don't know
if it works or not-would appreciate feedback.

This is a GIF file viewer for VGA/EGA with the following features:
  *  Now allows adjustment of picture color and contrast.
  *  Now allows you to spec a mode on the command line.
  *  Saves to GIF and PC Paint/Pictor formats in VGA or EGA.
  *  Now handles up to 500 files.
  *  Determines equipment and uses VGA where possible.
  *  Very fast GIF decoding.
  *  Menu driven for selecting file(s) to view; returns with cursor at last
  *  Shows specified files like a slide show for EGA.
  *  /R option allows an application program to show a file and regain control.
  *  Creates PC Paint, ZSoft, Dr. Halo, or EGA PAint file from current pic
  *  Gives much better color rendition.
  *  Now allows creation of full size PC Paint, ZSoft, Dr. Halo (.CUT and .PIC)
     and EGA Paint files in EGA mode.

Format: vgif [path\filespec] [path\][filename[.ext]] [/e] [/r] [/mode,number].
     The default path is the current directory, and the default extension is
     GIF. The /r option returns control to a calling program; see 5 below. The
     /e option forces EGA mode if you have VGA, so all file conversions work.
     If a filename is given, the single file will be shown. If path is a
     directory, a menu of all files meeting filespec will appear. The mode
     command is detailed in 6 below.

The commands are:
1. vgif [path\]filename[.ext] shows the file specified. The default path is the
     current directory, and the default extension is GIF.

2. vgif [.ext] to get a menu of up to 500 files in current dir with extension
     ext. The default extension is GIF. This is handy if you have some pictures
     that you don't want to come up in the normal menu; ie, adult and nude pics
     can be renamed to ADL extension.

3. vgif [path\][filespec] to get a menu of all files in the specified path
     meeting filespec (may contain wildcards but not period). The default path
     is the current directory, and the default filespec is *.GIF; just entering
     'vgif' will give a menu of all GIF files in the current directory. Shows
     whether VGA or EGA and modes supported in upper left corner.

4. vgif @[path\]filename[.ext]  to do a slide show from commands in filename. The
     default path is the current directory, and the default extension is SLD.
     The commands are placed on seperate lines, and consist of either a filename
     (GIF extension assumed), or a delay (viewing time) spec of the form  d n
     where n is the desired viewing time in seconds. The default viewing time is
     5 seconds if no delay spec is given. Press any key to end the slide show.
     Pictures that are 320 or less pixels wide are displayed double size.

5. vgif /r shows the file and then returns to DOS (or a calling application
     program) with the picture still on the screen in EGA/VGA. It is not
     necessary to change video mode between viewing each file, but it is up to
     the calling program to reset text mode (mode 3) after all viewing is done.

5. vgif /e forces and EGA display with VGA, so all file conversions, slide mode,
     and palette revisions work; forces operation like VGIF ver 2.0.

6. vgif /mode,ax[,bx] tells VGIF to use the ax and optional bx values to set
     the specified VGA/EGA video mode. Allowable modes and default values are:

                                        Default values    Modes for Other Cards
          Mode      Size & colors       ax       bx    AST/Paradise  Vega (bl)
          vga200;   VGA 320x200x256     13h       0        13h       13h
          vga350;   VGA 640x350x256     2Dh       0        -         -
          vga400;   VGA 640x400x256     5Eh       0        5Eh       66h
          vga480;   VGA 640x480x256     2Eh       0        5Fh       67h
          vga540;   VGA 720x540x256     6F05h     68h      -         68h
          vga600;   VGA 800x600x256     30h       0        -         69h
          ega350;   EGA 640x350x16      10h       0        -         10h
          ega480;   EGA 640x480x16      12h       0        12h       12h
          ega600;   EGA 800x600x16      29h       0        58h       62h
          ega720;   EGA 960x720x16      36h       0        -
          ega768;   EGA 1024x768x16     37h       0        -         65h
      - For Vega Extended boards, set ax=6F05h and mode number in bl.

     You may enter any number of these mode specs on the command line.
     For example, if you have a Paradise VGA PRO board and want to use
     640x480x256 (which is Paradise mode 5Eh) you would enter /vga480,0x5e
     on the command line. This will replace the default 2Eh value with 5Eh.
     You can enter the mode in decimal, or hex if you use the 0x prefix.
     To set the Vega V7VGA, enter /vga480,0x6f05,0x67
     I am not sure this will work on all boards, and would like feedback on

7. vgif ?  gives a help screen.

Commands in menu mode: * => EGA only
1.   The up, down, right, and left arrow keys move the cursor around the menu
     of files. PgDn/PgUp goto next/previous page. Pressing a key goes to next
     file starting with this character.
2.   Pressing the spacebar marks a file for viewing or slides, and moves to the 
     next file; it will also unmark a previously marked file.
3.   Pressing enter will display the marked files in the order they were marked.
     If no files were marked, pressing enter displays the file at the cursor.
4.   Pressing F3 will display the file size and colors on the next to last line.
5.   Pressing F1 will bring up the help screen; any key will return to the menu.
6. * Pressing F2 will do a slide show of marked files until a key is pressed;
     doesn't work yet for VGA.
7.   Pressing ESCape ends the program and returns to DOS.
8.   Pressing Ctrl Break (or Ctrl C) will get you directly to DOS.
All other keys are ignored. If errors are encountered, an error message appears
on the next to last line, and disappears when the cursor is moved. 
The menu title is the search spec.

Commands while viewing a file (except in slide mode):
1.   The up/down arrow keys will scroll the picture if longer than the screen.
     The PgUp and PgDn keys will scroll by 10 lines.
2.   If pic is <= 1/2 the screen width, pressing 2 will give a double size image
     (which may be scrollable) and pressing 1 will give the normal size again.
     For VGA, the picture will be chaged only in the horizontal direction; this
     will unsquash some 320x400 pics so the aspect ratio is correct.
3.   Pressing + will increase the resolution for VGA (320x200 to 640x480, etc).
4.   Pressing - will decrease the resolution for VGA; useful if 800x600 rolls.

Presently, the following commands with an * work only with EGA (or VGA with the
/e option) at this time. Some will be implemented in later versions. All the
conversion options check if the default filename is present, and promt for a
new name if it is. They all now let you know what is happening while the
conversion prodceeds. If you screw up at the new filename prompt, hit Ctrl C
to escape immediately to DOS; this will usually preserve a file you don't want
to write over. The safest bet is to view files on floppy, while running VGIF
from the hard disk. The new file is saved to the default drive, which is the
directory you run VGIF from.
5. * Pressing Z will create a ZSoft (PC Paintbrush) file with the same filename
     and extension PCX. The file will be a 640x350 paint file of what is
     currently on the screen.
6.   Pressing P will create a PC Paint or Pictor file with the same size as the
     current screen. The default extension is .PIC, and for EGA it prompts for
     a PC Paint or Pictor file.
6.   Pressing G or I will create a GIF file on the default drive, and promt for
     a new filename-the default extension is GIF; G is for non-interlaced, and
     I is for interlaced files. The GIF file will be the same size as the
     current image.
7. * Pressing R will create a RIX (EGA Paint) file with the same filename and
     extension SCR (or SCP if a long pic and L pressed first).
8. * Pressing H will create a Dr. Halo pic file with the same filename and
     extension PIC. The file will be a 640x350 paint file of what is currently
     on the screen. A palette file will be created.
9. * Pressing C will create a Dr. Halo cut file with the same filename and
     extension CUT. The pic will be the same size as the GIF file is currently
     on the screen. A palette file will be created.
10.  Pressing enter will return to menu or DOS, or show next file for marked
     menu mode.
11.  Pressing ESCape will end the display and return to the menu.
12.* Pressing L before pressing Z, P, R, C or H will save the picture to that
     file type from the top of the current screen to the end of the
     picture. Thus, if viewing a 640x480 pic, and you press LP, you will
     create a PC Paint pic file that is a 640x480 image. If you had
     scrolled up 10 lines, it would create a 640x470 image, etc.  Pressing
     S will cancel the L command. For Dr. Halo .PIC files, the L creates a
     640x480 file if the GIF file was between 351 and 480 rows.
13.  The following keys control the picture tone as follows:
     F1   Decrease red content of picture.
     F2   Increase red content of picture.
     F3   Decrease green content of picture.
     F4   Increase green content of picture.
     F5   Decrease blue content of picture.
     F6   Increase blue content of picture.
     F7   Decrease contrast of picture (VGA only).
     F8   Increase contrast of picture (VGA only).
     F9   Decrease brightness of picture (VGA only).
     F10  Increase brightness of picture (VGA only).
 Alt-F10  Restore original palette after you thoroughly mess up the colors.
     V    Reverses the current palette (EGA only); interesting effect especially
          for black & white images.

     After a little experimenting, a 'washed out' VGA picture can be greatly
     improved by using F1-F10 , and you can always start over by using Alt-F10.
     To retain a black background in a VGA picture, the brightness should be
     decreased when the contrast is decresed. If you have really improved the
     picture, you can then save it to GIF by pressing G of I.

All other keys are ignored. Pressing Ctrl Break (or Ctrl C) will go to DOS.
VGIF is user supported software.  VGIF for the IBM  PC is made available for a
free ten day trial period.  If you find this program useful,  you may license
the  program for non-commercial use on one machine by sending $10.00 to:

     Bob Montgomery
     123 Parsons Road
     Longwood, Fl 32779

VGIF may be licensed for commercial use on up to 10 computers at a single site
or set of contiguous sites for $50.00. A commercial site is defined as a
business or individual seeking to make a profit by selling VGIF or incorporating
this program in another program.

Clubs, schools,  universities and other organizations may license VGIF for
$30.00 per 6 copies.

All other rights are reserved.

VGIF may not be changed or modified in any way  except by the author.  VCUT may
be freely distributed for the ten day trial period as long as it remains in its
complete form.  Regardless of how the  copy is  obtained, it is requested that
all users comply with the licensing agreement.

All licensing registrations will  be promptly  acknowledged.  All licensees
will  receive prompt  notification of product revisions and will be able to
purchase updates at a nominal fee.

All  warranties  are  disclaimed,  including  damage  to hardware and/or
software from use of this product.

Any suggestions or comments can be mailed directly to me, or left on
the following BBS's:
Tsunami BBS, Half Moon Bay, Calif. (415) 726-2726
PC Rockland, S. Nyack, NJ (914) 353-2176 [Freeboard] 300+ Meg Online
Revision history:
ver 1.1   1-13-88
          Added test for EGA adapter.
          Fixed menu colors.
          Allow ESCape from marked file viewing.
          Added Ctrl Break (or Ctrl C) exit to DOS anywhere.
          Added 'disk full' notification when creating picture file.
          Added critical error handler for 'drive not ready' errors.
ver 1.2   1-15-88
          Changed name to vgif.
          Slide mode now ignore the end of file mark in slide file, and any key
               will now end slide mode.
          Added slides to menu mode if S pressed-shows marked files as slides
               until a key is pressed.
ver 1.3   1-21-88
          Added better error checking to GIF file decoding. Notifies if bad GIF
          Fixed error reporting bug in single file mode.
ver 1.4   2-9-88
          Added instantaneous screen update in slide mode from menu or command
               (sld) file.
          Added the /r option which allows an application program to call VGIF 
               to view a file and then regain control.
ver 1.5   3-2-88
          Added Page Up and Page Down keys to scroll by 10 lines at a time.
          Added a max pic height of 819 lines so EGA buffer would not overflow.
          Greatly improved color reproduction for 'problem' pictures (such as
              FROG, ARCHIT, PUFFIN, VEGTABLE, etc). These pictures typically
              have more than 16 colors. Selected colors on basis of frequency
              of use where possible.
          Fixed following bugs:
          1.  Line buffer would overflow into other variables if pic width
              was > 640 pixels, causing strange results.
          2.  Didn't recognize the end of image marker correctly. This would
              cause the palette to change when the image was done.
ver 1.6   3-11-88
          Fixed a bug in handling multiple images. First noticed when viewing
          Use same palette for multiple images, and get best color match.
          Added L and S commands while viewing a picture. These allow you to
               create full size paint program files.

ver 2.0   3-26-88
          Added the ability to view long GIF files ( > 819 lines) without
               wrapping the display.
          Added the C and H (Dr. Halo) file creation option while viewing.
          Added the L and S prefixes to paint program file creation commands
               while viewing to save long pic files.
          Added the Info and Help commands in menu mode.
          Deleted the # requirement to specify a directory from the command
               line. The program now looks for a directory which meets the
               spec on the command line. If none is found, it assumes the spec
               is for a single file.
          Added F1 - F10, and V palette control keys while viewing a file.

ver 3.0   5-2-88
          Added VGA capability, and support for Tseng extended VGA modes
               (640x480x256 and 800x600x256).
          Determines and displays available modes for your system.

ver 3.1   5-11-88
          Fixed a bug in dir/file spec from command line. Now accepts
               vgif d:\dir\*.gif or vgif d:*.gif, although the [\]*.gif is not
               required, since this is the default filespec.
          Fixed a bug in forced EGA when doing slides, where an interlaced pic
               displayed at double size would have a 'venetian blind' effect.
          Changed so pics larger than 320x200 are shown in 640x480 VGA; can get
               800x600 by pressing + key.
          Note that EGA mode on the Orchid VGA card appears squashed
               vertically. This is normal, and cannot be corrected without
               reprograming the parameters for mode 16, which would change
               the vertical retrace frequeny, and probably cause your monitor
               to roll.

ver 3.2   5-26-88
          Added 500 file menu, and assy language text screen updating; now
               super fast.
          Fixed a bug which caused the Vega VGA card to hang up.

ver 3.3   6-9-88
          Added user spec of video mode for non-Orchid VGA boards.
          Added GIF and Pictor save of current screen for VGA/EGA pics.
          Added prompts to screen for conversion to other formats.
          Removed conversion starting at first visible row-now does whole pic.

ver 3.4   6-23-88
          Fixed a bug in the GIF save routine.
          Added color, contrast, and brightness adjustment in VGA.
          Fixed a bug in menu mode for marked files.
Modified: Mon Aug 29 16:00:00 1994 GMT
Page accessed 7734 times since Sat Apr 17 21:29:53 1999 GMT