Contents of the CGHGIF.DOC file
CGHGIF 3.2 -- A GIF Decoder for CGA and Hercules
Copyright (C) 1988 By Chris Babcock [CIS 72657,2126]
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 computers
with either a CGA (Color Graphics Adaptor) or a monochrome Hercules video
card. Images are scaled and dithered to black and white pictures. CGHGIF has
gone through a two month development and testing period to assure the absence
of major bugs. If you encounter any problems, I would like to know so it can
CGHGIF can detect the video card being used and automatically configure
itself at run-time. I have found that the Hercules checking does not work on
all boards so a command line modifier "/H" has been added to force the
Hercules mode. All the commands will work with either card. If you are using
a Hercules card and the screen blanks after a little while after the program
has begun to process the GIF file, don't panic; it is normal. The screen will
return to normal when the image processing is finished.
The calling convention for CGHGIF is described below:
CGHGIF [-H] [-W] [-B] [-P] [-F"Path/Name (no ext)"] [-?] [Filename[.ext]]
It is not as confusing as it first looks. Each part enclosed in brackets
is 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"
+ "-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 a
given 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 each
image in it will be written out to a file in BLOAD format. The resulting
files 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" in
subdirectory "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 be
invoked with key presses after the image is on screen. These commands will
not be usable if the "-W" option has been selected. They are listed and
+ "Q" - Causes the program to exit to DOS without looking for any further
images in the GIF file.
+ "R" - Inverses the graphics screen. Black becomes white, and white
becomes black. This is useful with portable computers with a
reversed color LCD screen (ex. Toshiba 1000).
+ "B,P" - Same as the command line options. Saves under the appropriate
+ 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 error
distribution dithering using a 320 by 200 black and white screen. It grew
later to include the Burkes dither filter (developed by Dan Burke) and began
using the 640 by 200 screen for better blending. Later, the program was
updated to support Hercules and changed to another dithering method which
increased the speed without decreasing the quality. I am aware that this
program is slow and I am working on it. For now, enjoy the library of GIF
images with hopefully a better CGA or Hercules representation.
I can be reached on CompuServe, number 72657,2126 either by EasyPlex or
I am usually attending the GIF public conference in room 18 in the
GRAPHSUPPORT forum (previously PICS).