Dec 132017
 
Displays GIF (graphic interchange format) files.
File FASTGIF.ZIP from The Programmer’s Corner in
Category Display Utilities
Displays GIF (graphic interchange format) files.
File Name File Size Zip Size Zip Type
FASTGIF.DOC 30814 9616 deflated
FASTGIF.EXE 34238 17986 deflated

Download File FASTGIF.ZIP Here

Contents of the FASTGIF.DOC file


















FastGIF Version 2.0
Users' Manual


GIF and `Graphics Interchange Format' are trademarks (tm) of
CompuServe Incorporated, an H&R Block Company.

FASTGIF v2.0 is Copyright (C) 1987 James C. Beebe.
All Rights Reserved.


TABLE OF CONTENTS


1. FEATURES 1

2. USER SUPPORTED SOFTWARE 3

3. ABOUT GIF 4

4. FASTGIF HARDWARE SUPPORT 4

5. DISPLAY MODES 5

6. OPERATING MODES 6

7. MENU MODE 6

8. SLIDE SHOWS 8

9. FILE ORGANIZATION 8

10. PROGRAM DESCRIPTION 10


11. FUTURE 12

12. ERROR MESSAGES 12


1. FEATURES

FastGIF is an off-line decoder for the display of Graphics
Interchange Format (GIF) images on IBM personal computers or
compatibles, equipped with EGA or VGA display systems. GIF was
developed by CompuServe and features:

Machine Independence

GIF files may be exchanged between different computers and
graphics systems. With the proper decoder, each system will
display all GIF files to the best of the machine's capabilities.
This allows the widest possible audience for artists distributing
their images in the GIF format, and an immense selection of
images for those who enjoy viewing computer images.

Compression

GIF files are compressed using a highly effective adaptation
of the LZW algorithm. Communication and storage costs are held
to a minimum with the compression scheme. Since all GIF decoders
can uncompress GIF images, machine specific archival utilities
are not required for the images.

Performance

The Graphics Interchange Format allows for images up to 65535
dots wide by 65535 lines high, containing up to 256 colors
selected from up to 16 million different colors. While no
graphics hardware has these capabilities today, the format will
be able to handle the interchange of raster graphics well into
the future.

FastGIF was developed by James C. Beebe, and features:

Speed

FastGIF, as its name implies, is highly optimized for speed.
On any given computer, no current decoder achieves anywhere near
the display speed of FastGIF. Reportedly, fast '286 and '386
computers using FastGIF display images much faster than other
computers utilizing specialized graphics support hardware.
FastGIF is offered as evidence that the Intel family of
processors and the IBM family of personal computers are as
suitable for high performance graphics as any series of
microprocessors in any current personal computer!








FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 1


Visual Quality

FastGIF does not sacrifice the visual quality of displayed
images for its speed. In fact, no other current GIF decoder for
the EGA achieves comparable visual quality on as wide a range of
images as FastGIF.

Hardware Support

While FastGIF does not support systems less capable than the
256k EGA, its support of these systems is extremely complete,
including the ability to vertically scroll images which cannot be
completely displayed on an EGA without multiple sync rate
monitors.

User Interface

FastGIF provides a friendly user interface, including
selection of images from an onscreen menu, without requiring a
slow or complicated process to select and display images.

Slide Shows

FastGIF will display a series of images automatically by
following a user-generated command file.

User Supported

FastGIF is distributed for free trial, with no license fee
required until after the free trial period.
























FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 2


2. USER SUPPORTED SOFTWARE

FastGIF is user supported software. FastGIF represents as
large a creative and programming effort as many commercial
software packages costing hundreds of dollars. In the spirit of
user supported software, FastGIF is made available for a free ten
day trial period. If you find FastGIF to be useful, you are
obligated to pay for continued usage.

Because of the low distribution costs of user supported
software, FastGIF may be licensed for non-commercial use on one
machine at a time (like a book) for the cost of $19.95. For
commercial use, defined as a use of FastGIF where an individual
or commercial enterprise reasonably expects to use of FastGIF to
result in a profit, FastGIF may be licensed for $100.00 for up to
ten computers at a single site or set of contiguous sites.

FastGIF is the copyrighted property of James C. Beebe. All
rights are reserved other than those rights specified above. If
you do not pay for a license for the continued use of FastGIF,
you are obligated to discontinue its use after the ten day trial
period. FastGIF may not be modified by anyone other than the
author. FastGIF may be distributed to others only in its
complete, unmodified form, with no fee charged other than a fee
for media and duplication. No matter how you received your copy
of FastGIF, you are obligated to pay for a license after the
trial period.

FastGIF is available to be included with a product, or to be
incorporated into a product. Contact James C. Beebe for further
information.

All registrations will be promptly acknowledged.

James C. Beebe
2170 Dow Drive
Akron, Ohio 44313

Compuserve 74746,2444


FastGIF is made available for your enjoyment in the viewing
of GIF images. All warranties are disclaimed, including
consequential warranties. It is your responsibility to determine
whether FastGIF is suitable for your purposes. The high-
performance display of graphics images may not be compatible with
all combinations of graphics hardware. Make certain that your
hardware is suitable for use with FastGIF before risking machine
damage.





FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 3


3. ABOUT GIF

GIF files are a highly compressed, machine independent format
for the distribution of raster-based color graphics information.
The GIF file format was defined by CompuServe, who has made it
available for public usage. Over 1000 GIF files suitable for
viewing with FastGIF are available on the PICS forum of
CompuServe. There are also encoders and decoders for a variety
of different computers and graphics adapters available in the
Data Libraries of the PICS forum.

Because the GIF format is machine independent, the visual
quality of files may vary widely. A computer equipped with an
EGA card, especially with one of the extended EGA cards and a
monitor with multiple scan rates, and running FastGIF software,
is among the best at displaying GIF images. However, certain
files may not display well with any combination of hardware and
software.

The developers of GIF decoders continue to search for ways to
improve the visual quality of images displayed using the GIF
system.

4. FASTGIF HARDWARE SUPPORT

FastGIF requires an EGA card with 256k of memory and an EGA
monitor or a VGA system as furnished on the higher models of the
IBM Personal System II. Certain non-IBM EGA systems can be
equipped with monitors capable of switching to multiple scan
rates to provide higher resolution. FastGIF supports many of
these systems with "command line switches." Note that if you
have a standard EGA monitor, you should NOT use these command
line switches!

The switches are preceded by a hyphen (-) or a slash (/). The
switches in FastGIF are:
a Ahead Systems 640 x 480 (mode 38 decimal)
g Genoa 640 x 480 (mode 115 decimal)
t Tseng 640 x 480 (mode 37 decimal)
v VGA 640 x 480 (mode 18 decimal)
m### Use DECIMAL value ### to select 640 x 480
f Do not expand pictures; use only 640 x 350 modes.
Vega 480 line mode is automatically recognized.

If none of the switches are given, the default video mode
will be EGA mode 16, but pictures will be decoded as though a 640
x 480 mode was available. If the entire image does not fit on
the screen, the SHIFT keys may be used to scroll the image
vertically to view the entire picture. The left SHIFT key
scrolls the picture up, allowing more of the bottom of the image
to be seen. The right SHIFT key scrolls the image back down,
allowing more of the top of the image to be seen.


FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 4



These command line switches may be given any time FastGIF is
started. If your video hardware can benefit from one of these
switches, you may want to create a batch file to automatically
issue the switch. For instance, if you have a Tseng card with a
multiple scan rate monitor, you might create a batch file as
follows:

C>copy con fg.bat
FastGIF -t %1
^Z <-- this is generated by pressing F6 or
control Z.

You could then start FastGIF by typing:

FG image.gif

5. DISPLAY MODES

FastGIF has two different ways to display graphic images to
the screen. The first way is to decode the file directly to the
screen. When this is being done, you will see the image
"painted" on the screen as you watch. This method is used:
-- if you give a single filename on the command line.
-- if you press Return or F10 in menu selection mode with
no files currently selected.
-- for the first file displayed in a slide show.

The other method of displaying an image is to first decode it
in the background, and then to quickly copy the image to the
screen. When this is done, the picture will "pop up" from a
momentarily blank display screen. This method is used:
-- for images selected with the space bar from the menu.
-- for files after the first file in a slide show.

One of the most popular image sizes is 320 x 200. Unless the
-f option is given, FastGIF will display these images as 640 x
400 images. Since there are four pixels used on the display for
each pixel in the original image, extended color resolution can
be provided on these images, by carefully selecting the colors of
the four dots used to display each image pixel. This process is
called "dithering", and is an important part of FastGIF's ability
to provide high visual quality on these images.

Dithering is ONLY used on images decoded in the background;
images decoded directly to the screen are NOT dithered. If you
wish to compare a 320 x 200 image with and without dithering,
view it by decoding directly to the screen and by decoding in the
background. The difference can be amazing!





FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 5


6. OPERATING MODES

FastGIF can be operated in several different modes. The
simplest mode is invoked by giving a single filename (without
wildcards) on the command line of FastGIF. The image will be
decoded directly to the screen, and if it is too large to fit on
a single screen, it may be scrolled using the SHIFT keys. Press
the return key to return to DOS. An example would be:

C>FastGIF trees

The second mode is menu mode. This is invoked by giving no
file argument on the FastGIF command line, by giving a file
argument containing wildcards, by giving a directory name as the
file argument, or by giving a drive name as the file argument.
Further details on menu mode are given in the menu section below.
Examples:

C>FastGIF
C>FastGIF t*.gif
C>FastGIF \pictures
C>FastGIF a:

The third mode is slide show mode. This is invoked by giving
the name of the slide command file, preceded by the "@"
character, on the command line. Further information is provided
below. An example:

C>FastGIF @myslide

7. MENU MODE

FastGIF's menu mode provides a "user-friendly," intuitive
method to select files from a menu displayed on the screen.
Special care has been taken to make menu mode easy for advanced
users, as well, by minimizing the number of keystrokes required
to select and display files.

Help screens are available by pressing F1. The help screens
give a condensed version of the information in this manual, and
should be sufficient to allow operation of FastGIF without
referring to the manual.

Menu mode allows the selection of a series of images for
display, as described below. The time delay between these images
is selected by pressing F2, then entering a delay time (in
seconds) at the prompt. A negative entry will cause FastGIF to
wait for a key to be pressed between images.






FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 6


When FastGIF is invoked in menu mode, a list of files will
appear on the screen. The exact presentation of the filenames
will vary with the number of files; FastGIF displays as many
files on screen as possible, and reduces the level of detail
about the files as the number of files increases. (This strategy
allows full information on up to 46 files, and allows filenames
only for up to 184 files on a single screen.)

If more than 46 files are on a screen, the detailed display
may be selected with F4, and the compressed display selected with
F3.

Four function keys change the order of the files displayed.
These keys are:
F5 -- Sort by file size
F6 -- Sort by file date/time
F7 -- Sort by filename (default)
F8 -- Sort by file extension, then filename.

The F9 function key displays additional information about the
file, including the GIF version number, the image size of the
file, and the color resolution. This information is taken from a
header included in all GIF files, and its accuracy depends on the
accuracy of the header information.

Files are selected for display by moving through the file
list with the cursor keys. If more than one screen of files is
available, the Home, End, PgUp, and PgDn keys move through the
screens.

To select a file for display, press the space bar. The first
file selected is decoded in the background, and appears in red
while it is being decoded, then in green when it is ready for
display. Later files appear in yellow if selected. The first
file decoded cannot be unselected; later files can be unselected
by pressing the space bar. Files are displayed in the order they
are selected.

While the first file is being decoded, the keyboard may feel
a little sluggish. This is due to the computer being shared
between decoding and the onscreen presentation.

To display the selected files, press return or F10. The
selected files will then be displayed on screen, with the
appropriate delay time. Press return after all files have been
displayed to return to the menu.

If the return key is pressed when no files have been selected
for display, the file under the cursor will be decoded to the
screen. Refer to the discussion of image display modes above for
the differences between decoding to the screen and background
decoding.


FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 7



The ESC key will abort a series of images being displayed, or
will return to DOS from the main menu.

8. SLIDE SHOWS

FastGIF allows the presentation of user scripted slide shows.
A slide show script is an ASCII file, created with a text editor,
such as WordStar in non-document mode, which contains a series of
command lines. There are three types of command lines: image
filenames, delay settings, and the quit command. A slide show is
presented when FastGIF is started with the name of a slide show
script, preceded by the '@' sign, on the command lines, as:

FastGIF @my.sld


Images for the slide show are specified by entering their
filenames into the slide show script. Wild cards may be used.
Each file specification must be on a separate line.

The time each image is presented on screen is controlled by
the delay specification. This is a line in the command file
containing a hyphen, the character 'd', and the time delay to be
used. If a negative delay value is given, the slide show display
waits for the return key to be pressed before displaying the next
slide.

Slide shows loop. When the end of file is reached, the
program starts again from the beginning of the file. The -q
command in the script will cause the program to exit at that
point. The program will also exit if the ESC key is pressed
during execution of a slide show.

An example of a slide show script:

-d10 ..display each slide for 10 seconds
zap*.gif ..display all gif files starting with zap
pirate.gif ..display pirate.gif
pics.gif ..display the pics logo
-d-1 ..go to manual delay
-q ..quit when key is pressed



9. FILE ORGANIZATION

Keeping track of all of your image files can be difficult,
even with a program like FastGIF that shows you a set of image
files on a menu. The file selection method in FastGIF can assist
you in this task, however.




FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 8


One strategy is to keep all of your image files with the
CompuServe extension of .gif in your current directory... perhaps
the root directory of a floppy disk. If you start FastGIF from
this directory, all of your image files will be shown on the
screen.

Hard disk users tend to move from directory to directory. To
allow FastGIF to find image files from any directory, you can
keep your image files in a directory named \GIF on your current
drive. If the directory containing FastGIF is included in your
PATH command, you can start FastGIF from any directory and select
from the image files in your \GIF directory.

If you want to limit FastGIF to a certain group of files, you
can use one of two different methods. The most versatile is to
use different extensions for the different groups of files,
keeping all image files in a single directory. As an example, if
you have a large group of "comics" images, you could change the
extension on these slides to .cmc, then, to start FastGIF with
only the comic slides in the menu, you could use:

C>FastGIF *.cmc

To see all of the other images, start with

C>FastGIF *.gif

To see ALL of the images on the same menu, start with

C>FastGIF *.*

A similar strategy could be used with subdirectories. If you
want to segregate your "adult" images, they could be put in a
subdirectory named \PBW. You could then view the adult images
either by changing the directory to \PBW before starting FastGIF,
using just

C>FastGIF

or by starting with the command

C>FastGIF \PBW

The other images could be brought up by starting FastGIF from
any other directory, without the \PBW argument. This strategy
does not permit starting FastGIF with all images, as the
extension strategy does.







FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 9


10. PROGRAM DESCRIPTION

For those interested in the technical details of FastGIF, the
program was developed over a four month period, starting with the
specification and sample code provided to GIF developers by
CompuServe. The program evolution followed a series of goals,
with each goal being substantially reached before development
started on the next goal area. All coding followed highly
structured design standards, with exceptions limited strictly to
cases where significant measurable performance improvements could
be demonstrated.

The first goal was to improve the decoding and drawing speed
of the example program. To this end, the program was recoded
into assembly language. A series of iterative improvements were
made to the decoding and drawing modules of the program. A
performance analyzer was used to determine the areas of the
program where the largest portion of execution time was spent, so
that effort was constantly focused on the "hot spots" of the
program. Accurate measurements of time to display an image
multiple times were used to measure the effects of potential
improvements.

The second goal, which was largely unsuccessful, was to
improve the color selection strategy for images displayed on the
EGA. Strategies attempted included IQY and
Hue/Saturation/Luminance strategies, with gamma correction and
several weighting techniques, including non-linear weighting.
Many of these techniques provided improvement on some images, but
resulted in significant degradation of other images. The current
version of FastGIF has reverted to a rather simple RGB selection
for non-dithered pictures, which, while it may not provide an
optimum color selection on any one image, does not cause
degradation of images, either.

At the same time, the technique used for minimizing the
limitation of the 16-color EGA palette was developed, and this
technique has been quite successful. The algorithm used consists
of avoiding duplications in the palette until all entries have
been used, then selecting the closest match from colors already
in the palette for colors once the EGA palette has been filled.
This technique is quite successful on most images with up to 32
colors.











FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 10


The next goal was the user interface and path strategy.
Because quite satisfactory performance can be achieved in a high
level language in this area, the user interface is coded in
Borland's Turbo C. Assembly language routines are used for
screen writing. It was at this time that the improved "feel" of
background decoding was realized; the implementation of
background decoding was relatively straightforward due to the
structured techniques used in coding the decode-to-screen
subroutine.

The path strategy is used to take a user-supplied filename
and generate a filespec. The strategy, a small portion of the
"natural" user interface, was rather difficult to develop, and
the first test version released to the developers contained
significant bugs. Basically, the strategy allows the entry of
ambiguous filenames by the user, and using default extensions
(.sld for slide command files, .gif for images) and the default
directory (\gif), determines the intended user filespec.

As the result of conversations with other developers on the
Developer Subtopic of PICS, it was decided to investigate the
potential of dithering pixels for improved color performance.
One of the most difficult problems was in developing an algorithm
that would permit good visual performance without an excessive
speed penalty. The algorithm selected depends upon a table which
is generated by an optimized Turbo Pascal program, compiled using
the '87 package, and running on a fast AT clone with a '287. The
table generation program requires about 15 minutes to execute!
Several iterative developments have resulted in substantially
better visual quality than exhibited by the first implementation
of the dithering algorithm.

The current dithering algorithm depends on expanding pixels
from the image file into four dots onscreen. This works well
with 320 x 200 files displayed on 640 x 480 extended EGA systems
with multiple scan rate monitors, but leaves out the standard
256k EGA, and normal EGA monitors. To allow these users to enjoy
the improved color rendition available with dithering, vertical
scrolling of graphics images was implemented. In its current
form, the scrolling is automatically bounded by the size of the
image, allowing a natural "feel".













FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 11


11. FUTURE

In the future, the developer of FastGIF intends to
investigate additional goals for the program. These goals
include improvements to the dithering algorithm and the
possibility of dithering pictures larger than 320 x 200. A new
program, using the GIF decoding, dithering, and screen displaying
modules from FastGIF, will be developed to allow real-time, on-
line viewing of GIF images. Additional support will be developed
for the VGA, using both its 320 x 200 x 256 and its 640 x 480 x
16 modes, and taking advantage of its larger selection of colors.
Support is also intended for the rumored super VGA's, with 640 x
480 x 256 capability. These enhancements and additions will be
announced in the PICS forum.

12. ERROR MESSAGES

Bad Separator Character '*'
The internal format of the GIF file is inconsistent with
the definition. Report the error to the Sysop on the forum where
the file was found.

Cannot open slide file x:\dir\filespec.ext
The indicated slide file could not be opened. Respecify
with a filespec that will select an existing file.

Early End of File
The internal format of the GIF file is inconsistent with
the definition. Report the error to the Sysop on the forum where
the file was found.

Error Expanding Data
The internal format of the GIF file is inconsistent with
the definition. Report the error to the Sysop on the forum where
the file was found.

Error Reading Extension Block
The internal format of the GIF file is inconsistent with
the definition. Report the error to the Sysop on the forum where
the file was found.

Error Reading Image Head
The internal format of the GIF file is inconsistent with
the definition. Report the error to the Sysop on the forum where
the file was found.

Insufficient Memory to run FastGIF
FastGIF cannot allocate enough memory to operate. Free up
some memory by removing TSR programs (such as Sidekick), and try
again.




FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 12


No Matching Files
FastGIF was not able to find any files matching the
filespec on the command line.

Not a GIF File
The header on the file does not indicate a GIF file. Check
that this is a GIF file you have downloaded. If it is, verify
your download process (using a protocol such as XMODEM or CIS B
protocol). If the file still will not decode, notify the Sysop
on the forum where the file was found.

Unrecognized Option *
The option character given in the command line was not
recognized by FastGIF. Refer to this documentation for the
correct option characters.








































FastGIF V2.0 (c) 1987 James C. Beebe 74746,2444 Page 13


 December 13, 2017  Add comments

Leave a Reply