Contents of the CGHGIF.DOC file

GIF and "Graphics Interchange Format" are trademarks (tm) of CompuServe Incorporated, an H&R Block company

Release date: January 21, 1989 Version 3.2 (First)

This program is a GIF decoder for IBM PC/XT/AT and compatible computerswith either a CGA (Color Graphics Adaptor) or a monochrome Hercules videocard. Images are scaled and dithered to black and white pictures. CGHGIF hasgone through a two month development and testing period to assure the absenceof major bugs. If you encounter any problems, I would like to know so it canbe corrected.

CGHGIF can detect the video card being used and automatically configureitself at run-time. I have found that the Hercules checking does not work onall boards so a command line modifier "/H" has been added to force theHercules mode. All the commands will work with either card. If you are usinga Hercules card and the screen blanks after a little while after the programhas begun to process the GIF file, don't panic; it is normal. The screen willreturn to normal when the image processing is finished.

It is not as confusing as it first looks. Each part enclosed in bracketsis optional. I'll start by listing the options separately.

+ "-H" - As noted in the above text, this option will force the program to assume a Hercules graphics card is in use.

+ "-W" - CGHGIF supports multiple image GIFs. This option refers to keeping the program from waiting for a keypress to continue to the next image. It is useful with GIFs with animation or for converting each frame to a standard format with the "-B" and "-P" options.

+ "-B" - This option allows the frame on screen to be saved as a Basic BLOAD (CGA) image. The filename specified for the GIF is used with the extension replaced with a "B" followed by its number in sequence 00 to 99. This allows multiple frames to be saved.

+ "-P" - The image is saved to diskette with this option also. The differences are in the format and the extension. Like the above option, the extension takes the form of a letter and a number in sequence. The letter naturally is "P". The format is "PIC" which is supported by a few GIF encoders and some paint programs.

+ "-F" - This is a more complex option. It allows the resulting files from either of the two saving options to be redirected to a new path and filename. The option takes the form of -F followed by the new name or new path/name in quotation marks. The filename MUST NOT HAVE AN EXTENSION.

+ "-?" - This simply lists each option and a brief description on the screen as a quick reference.

A good use for the saving and "-W" options is to save all the frames in agiven GIF to your preferred storage method for modification or faster viewing.Take a look at the command line below:

CGHGIF -W -B SAMPLE

The command will cause the GIF named "SAMPLE" to be decoded and eachimage in it will be written out to a file in BLOAD format. The resultingfiles will be named, for example, as "SAMPLE.B00", "SAMPLE.B01", "SAMPLE.B02"and so on to the end. If you would like the files to be named "TEST.B00" insubdirectory "PICS" on drive C:, then the following would be used:

CGHGIF -W -B -F"C:\PICS\TEST" SAMPLE

In addition to the command line options, there are commands that can beinvoked with key presses after the image is on screen. These commands willnot be usable if the "-W" option has been selected. They are listed anddescribed below:

+ "Q" - Causes the program to exit to DOS without looking for any further images in the GIF file.

+ "B,P" - Same as the command line options. Saves under the appropriate format.

+ other - Exits the program if there are not any further images in the GIF file, or starts decoding the next image.

This program was originally written as a test of Floyd/Steinberg errordistribution dithering using a 320 by 200 black and white screen. It grewlater to include the Burkes dither filter (developed by Dan Burke) and beganusing the 640 by 200 screen for better blending. Later, the program wasupdated to support Hercules and changed to another dithering method whichincreased the speed without decreasing the quality. I am aware that thisprogram is slow and I am working on it. For now, enjoy the library of GIFimages with hopefully a better CGA or Hercules representation.

I can be reached on CompuServe, number 72657,2126 either by EasyPlex orI am usually attending the GIF public conference in room 18 in theGRAPHSUPPORT forum (previously PICS).