home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PRINTING
/
GIFP32.ZIP
/
GIFPRT.DOC
next >
Wrap
Text File
|
1990-09-03
|
38KB
|
1,255 lines
GIFPRT User's Guide 9/3/90
GIFPRT User's Guide
Version 3.2
Copyright (c) 1990 Edward B. Hamrick
All Rights Reserved
Please send all suggestions, error reports, and corrections to:
Compuserve: 71470,3236
GEnie: E.HAMRICK1
Copyright (c) 1990 Edward B. Hamrick Page 1
GIFPRT User's Guide 9/3/90
TABLE OF CONTENTS
1.0 Introduction....................................................4
2.0 Prerequisites...................................................6
2.1 Hardware Required..........................................6
2.2 Software Required..........................................6
2.3 Registering GIFPRT.........................................6
3.0 Running GIFPRT..................................................8
3.1 Rotate Option (-R)..................................8
3.2 LCD Option (-L)..................................8
3.3 Width Option (-W)..................................8
3.4 Height Option (-H)..................................9
3.5 Brightness Option (-B)..................................9
3.6 Contrast Option (-C)..................................9
3.7 Graphics Type Option (-G).................................10
3.8 Snow Checking Option (-M).................................10
3.9 Printer Type Option (-P).................................11
3.10 Slide Show Option (-S).................................11
3.11 Output Option (-O).................................12
3.12 Dithering Option (-D).................................12
3.13 Keep Image Option (-K).................................13
3.14 Quiet Option (-Q).................................13
4.0 Customizing GIFPRT.............................................14
5.0 Sample GIFPRT Commands.........................................15
6.0 Changes from Previous Version..................................16
7.0 Error Messages.................................................17
Copyright (c) 1990 Edward B. Hamrick Page 2
GIFPRT User's Guide 9/3/90
TRADEMARKS
GIF, Graphics Interchange Format, and Compuserve are trademarks of
Compuserve, Inc., an H&R Block Company.
GEnie is a trademark of General Electric Company, U.S.A.
IBM and PC-DOS are registered trademarks of International Business
Machines Corporation. IBM PC, XT, and AT are trademarks of
International Business Machines Corporation.
Microsoft and MS-DOS are registered trademarks of Microsoft
Corporation.
Hercules is a trademark of Hercules Computer Technology.
Epson is a trademark of Epson America.
ACKNOWLEDGEMENTS
GIFPRT was written entirely using Turbo C.
The User's Guide was created using Microsoft Works.
Copyright (c) 1990 Edward B. Hamrick Page 3
GIFPRT User's Guide 9/3/90
1.0 Introduction
GIFPRT is a program that lets you display and print graphics
files that use the Graphics Interchange Format, commonly known as
GIF files. GIFPRT will let you print using almost any type of
printer, including those that support Epson and IBM 8-pin and 24-
pin graphics. GIFPRT can also be used to display any GIF file on
almost any type of alphanumeric or graphics adapter, including
MDA, Hercules, CGA, EGA, MCGA, and VGA adapters.
Most graphics devices are capable of only displaying a few
colors or shades of gray, and dot-matrix printers are only
capable of displaying an array of black dots. However, many GIF
files contain images with up to 256 different colors. GIFPRT
uses an error-dispersion algorithm (also called a dithering or
half-toning algorithm) to try to display the image in the GIF
file. This error dispersion algorithm takes advantage of the
number of colors that an adapter can display to approximate the
colors in the GIF file. If you have a VGA adapter, GIFPRT can
use the 256 color display capability and display images without
any need for dithering.
There are a many different printer and adapter resolutions.
For instance, some printers can display 60, 120, or 180 dots per
inch, in either the horizontal or vertical direction. Other
printers display 72, 144, and 216 dots per inch, and yet others
display combinations of 60 and 72 dots per inch in both
directions. Display resolutions can vary from 80 by 50 pixels,
to 640 by 480 pixels, with a dozen resolutions between. GIF
files can contain images with an equally wide range of
resolutions. The GIFPRT program contains a sophisticated
resolution-matching algorithm to match the GIF file resolution
with the printer or display adapter resolution.
Even though GIFPRT handles the most popular printer types,
you may need to use a different printer. It is possible to
customize GIFPRT to handle almost any other printer (see section
4.0).
This User's Guide contains some examples of actual output
from the GIFPRT program. These examples of actual output will be
highlighted by a row of dots before and after the example. For
example, the help screen for the GIFPRT program is:
Copyright (c) 1990 Edward B. Hamrick Page 4
GIFPRT User's Guide 9/3/90
...............................................................................
GIFPRT Version 3.2 Copyright (c) 1990 Edward B. Hamrick
GIFPRT is a program that lets you print GIF (Graphics Interchange Format)
files on a wide range of dot matrix printers and graphics displays. It uses
dithering to display continuous-tone images, and has a sophisticated method
of adjusting for different screen and printer resolutions.
Usage: GIFPRT [options] [files] where [options] are:
-R rotate image 90 degrees -L LCD screen (black on white)
-Wn width multiplier [1..999] -Hn height multiplier [1..999]
-Bn brightness [1..9] -Cn contrast [1..9]
-Gn graphics type [0..15] -Mn snow checking mode [0..1]
-Pn printer type [0..9] -S slide show
-On output option [0..32767] -Dn dithering option [0..1]
-K keep image on screen after exit -Q quiet mode
and where [files] can contain wildcards.
Example: The command GIFPRT -S -G4 *.GIF will display a slide show
of all GIF files in the current directory using a 4-color CGA
display mode with color halftoning (dithering).
...............................................................................
Copyright (c) 1990 Edward B. Hamrick Page 5
GIFPRT User's Guide 9/3/90
2.0 Prerequisites
The following three sections describe the hardware and
software required to run the GIFPRT program, and describe how to
purchase a password to use GIFPRT.
2.1 Hardware Required
In order to use GIFPRT, you will need an IBM PC, XT, AT, or
other compatible personal computer with a minimum of 256K of
memory. GIFPRT will run at any hardware clock speed, including
4.77 MHz, and can be loaded from either a floppy disk or a hard
disk. GIFPRT will display GIF images on almost any display
adapter, and on most Epson and IBM compatible printers.
2.2 Software Required
In order to run GIFPRT, you will need a copy of MS-DOS or
PC-DOS, version 2.0 or higher. You also need the following
GIFPRT files:
GIFPRT.EXE Main GIFPRT program
GIFPRT.PR1 Epson 8-pin 60 dot-per-inch print commands
GIFPRT.PR2 Epson 8-pin 120 dot-per-inch print commands
GIFPRT.PR3 Epson 24-pin 180 dot-per-inch print commands
GIFPRT.PR4 IBM 24-pin 180 dot-per-inch print commands
GIFPRT.PR5 Same as GIFPRT.PR1 but smaller print area
GIFPRT.PR6 Same as GIFPRT.PR2 but smaller print area
GIFPRT.PR7 Same as GIFPRT.PR3 but smaller print area
GIFPRT.PR8 Same as GIFPRT.PR4 but smaller print area
GIFPRT.DOC GIFPRT User's Guide
GIFPRT.GIF GIF Test Pattern File
2.3 Registering GIFPRT
GIFPRT is distributed via Compuserve and GEnie as shareware,
and may be evaluated for one month without charge. If you decide
you want to purchase GIFPRT, you can register GIFPRT by running
it and following the on-screen instructions for registration.
GIFPRT is fully functional before it is registered. When the
program is registered, you will receive a password that disables
the printing of the registration request form whenever the
program is run.
When you run GIFPRT prior to receiving a registration
password, you will see the following message:
Copyright (c) 1990 Edward B. Hamrick Page 6
GIFPRT User's Guide 9/3/90
...............................................................................
Please enter your 8-letter password. It should contain only the
digits 0 through 9, and the letters A through F.
Note that you can still test all of the features of GIFPRT without
having a password - just enter '0' when prompted for a password.
A GIFPRT registration form will then be printed on your printer.
Turn your printer off now if you don't want the registration form
to print. There will be a 30 second delay if the printer is off.
Password:
...............................................................................
If you haven't yet registered GIFPRT and received your
password, enter a zero, and you will get a message containing
instructions describing how to register GIFPRT. If you have a
printer connected to your system, and if the printer is turned
on, a registration form suitable for mailing will also be
printed. If you enter a valid password, you will not see the
message, and a registration form will not be printed.
Once you enter the password correctly, the password will be
put into the file GIFPRT.PWD. After this, you won't be prompted
for the password any more.
The GIFPRT Code that is displayed on the registration
request form is a simple checksum of the ROM BIOS (top 8 KBytes
of 8088 address space). The first four digits are the checksum,
and the last four digits are the one's complement of the first
four. The password you are sent will work on all IBM PC's or
compatibles that have the same ROM BIOS. However, you are
requested to purchase one password for each computer you will be
running GIFPRT on.
Copyright (c) 1990 Edward B. Hamrick Page 7
GIFPRT User's Guide 9/3/90
3.0 Running GIFPRT
To run GIFPRT, type the following command at a DOS prompt:
GIFPRT [options] [files]
The various options that are available are described in
paragraphs 3.1 through 3.14. The options and files are processed
from left to right. Whenever a file name is encountered, the
options that have been set during the left-to-right processing
are used to print or display the file. Files may also be
specified with wild-cards, such as *.GIF. All options may be
entered in either upper or lower case.
If you want to terminate GIFPRT, press either control-C or
control-break.
3.1 Rotate Option (-R)
You can use the rotate option to rotate the displayed image
by 90 degrees, clockwise. This allows you to print a GIF file on
a full sheet of paper, instead of just the top half. When this
option is in effect, the width and height options (sections 3.3
and 3.4) are relative to the unrotated image.
3.2 LCD Option (-L)
You can use the LCD option to display GIF files on many
laptop displays. These displays often use dark dots to make up
an image, instead of the white dots normally used on graphics
displays.
3.3 Width Option (-W)
You can use the width option to widen an image relative to
its height. If you widen an image, its height will actually be
reduced, resulting in a "wider looking" image. You won't
normally have to use this option. GIFPRT assumes that the GIF
file contains a single screen image, and tries to fit this to the
display adapter or printer resolution automatically. The -W
option should only be use to augment the automatic sizing
performed by GIFPRT. Images that are widened are still centered
on the screen.
Copyright (c) 1990 Edward B. Hamrick Page 8
GIFPRT User's Guide 9/3/90
3.4 Height Option (-H)
You can use the height option to increase the height of an
image relative to its width. If you heighten an image that is
printed, it will be printed on a longer strip of paper. If you
heighten an image that will be displayed on a graphics adapter,
its width will actually be reduced. This option is useful if you
are displaying a GIF file on some laptops with screens that are
much wider than they are tall. For instance, using the -H2
option will usually make images have the proper aspect ratio on a
Toshiba T1000 laptop. Note that you can use the -H and -W
options together to scale an image by a non-integral value. For
instance, if you want to multiply the height by 5/4, use the -H5
-W4 options. Images that are heightened are still centered on
the screen.
3.5 Brightness Option (-B)
You can use the brightness option to increase the intensity
of a GIF file. This is sometimes useful when printing on 24-pin
printers, when the image is too dark, or when you want to avoid
wearing out the print ribbon. The normal brightness option is 5,
the brightest setting is 9, and the darkest is 1. A brightness
of 9 increases the minimum intensity to 80% of the maximum, and a
brightness of 1 decreases the maximum intensity to 20% of the
minimum. A brightness of 5 does not alter the image.
3.6 Contrast Option (-C)
You can use the contrast option to change the contrast in an
image. This is primarily useful for adjusting for dot overlap on
printed images. Normal contrast is 1, and contrast values can go
up to 9. A contrast of 5 does not alter the image, and gamma
functions of 1.25, 1.5, 2.0, and 3.0 are used for contrasts of 6,
7, 8, and 9 respectively. Contrasts of 1, 2, 3, and 4 use gamma
functions which are the mirror images of 9, 8, 7, and 6.
Copyright (c) 1990 Edward B. Hamrick Page 9
GIFPRT User's Guide 9/3/90
3.7 Graphics Type Option (-G)
You can use the graphics type option to select the type of
graphics adapter and display mode. The table below contains a
list of supported graphics types, resolutions, number of colors,
adapters supported, and CRTs supported.
Type Resolution Colors Adapters CRT Types
---- ---------- ------ --------- -----------
-G0 80 x 50 2 M C E V H m c e a
-G1 160 x 100 2 C c
-G2 160 x 175 2 M H m
-G3 320 x 200 2 C E V c e a
-G4 640 x 200 2 C E V c e a
-G5 640 x 350 2 E V m e a
-G6 640 x 480 2 V a
-G7 720 x 348 2 H m
-G8 320 x 200 4 C E V c e a
-G9 160 x 100 5 C c
-G10 160 x 175 5 M H m
-G11 80 x 50 16 C E V c e a
-G12 160 x 100 16 C c
-G13 640 x 200 16 E V c e a
-G14 640 x 350 16 E V e a
-G15 320 x 200 256 V a
Codes: M MDA - Monochrome Display Adapter
C CGA - Color Graphics Adapter
E EGA - Enhanced Graphics Adapter
V VGA - Video Graphics Array
H HGC - Hercules Graphics Card
m monochrome display 350 lines
c color display 200 lines
e enhanced color display 350 lines
a analog display 480 lines
You can display this list of graphics modes from within
GIFPRT by typing "GIFPRT -G?".
3.8 Snow Checking Option (-M)
You may want to use this option if you have a CGA display
adapter that looks "snowy" when images are displayed. Using the
-M1 option will eliminate the "snow", but the display update
speed will be slower. The default mode of GIFPRT is the faster
update speed - no snow checking.
Copyright (c) 1990 Edward B. Hamrick Page 10
GIFPRT User's Guide 9/3/90
3.9 Printer Type Option (-P)
You can use the printer type option to select the type of
printer you want to use. The available printer types, their
option numbers, number of print head pins used, resolutions, and
whether the image fills the page are described in the table
below. Modes 5 through 8 are useful for getting a quick preview
of what a printout will look like. Use these modes to test
contrast and brightness settings for modes 1 through 4.
Option Type Pins Horizontal Vertical Full
Code Resolution Resolution Page
------ --- ---- ---------- ---------- ----
-P1 Epson 8 60 dpi 72 dpi Yes
-P2 Epson 8 120 dpi 72 dpi Yes
-P3 Epson 24 180 dpi 216 dpi Yes
-P4 IBM 24 180 dpi 216 dpi Yes
-P5 Epson 8 60 dpi 72 dpi No
-P6 Epson 8 120 dpi 72 dpi No
-P7 Epson 24 180 dpi 216 dpi No
-P8 IBM 24 180 dpi 216 dpi No
You can display a list of available printer modes from
within GIFPRT by typing "GIFPRT -P?".
3.10 Slide Show Option (-S)
The slide show option is used to continuously display a
group of GIF files on the screen. When the last GIF file is
displayed, GIFPRT starts over with the first GIF file. Normally
GIFPRT beeps and waits for a keypress after displaying a GIF
file. With the slide show option, no keypress is required
between GIF files.
Copyright (c) 1990 Edward B. Hamrick Page 11
GIFPRT User's Guide 9/3/90
3.11 Output Option (-O)
The output option is used to either change the print width
for printouts, or to change the color palette for CGA 4-color
displays (mode -G8).
When displaying a file using the -P option, the -O option
will set the width of the printout, in dots. For instance, -O120
will make the printout 120 dots across. The length of the
printout will be affected by the -W, -H, and -R options.
When displaying a file using the -G8 option, the -O option
will set the color palette that is used. The first part of the
option is the background color, and the second part is the color
palette. For instance, if you want a background color of light
magenta (13), and a light green/pink/yellow palette (3), use -
O133.
Palette Description
------- -----------------
0 Cyan/Magenta/White
1 Green/Red/Brown
2 Light Cyan/Light Magenta/Bright White
3 Light Green/Pink/Yellow
Background Description
---------- -----------
0 Black
1 Blue
2 Green
3 Cyan
4 Red
5 Magenta
6 Brown
7 White
8 Gray
9 Light Blue
10 Light Green
11 Light Cyan
12 Pink
13 Light Magenta
14 Yellow
15 Bright White
3.12 Dithering Option (-D)
The dithering option can be used to disable dithering, and
to display the closest available colors. This option allows
quicker viewing of GIF files, and sometimes produces better
looking images of cartoon-like GIF files. The -D0 option disables
dithering, and the -D1 option enables dithering. The default
option is dithering enabled.
Copyright (c) 1990 Edward B. Hamrick Page 12
GIFPRT User's Guide 9/3/90
3.13 Keep Image Option (-K)
The keep image option can be used to leave a displayed image
on the screen when GIFPRT exits. Normally GIFPRT erases the
screen and restores the original display mode upon exit.
However, if you are invoking GIFPRT from a batch (.BAT) file, or
starting it from within another program, you can prevent the
restoration of the original display mode by using the -K option.
3.14 Quiet Option (-Q)
Normally GIFPRT beeps and waits for a keypress after
displaying a GIF file. If the quiet option is specified, GIFPRT
will not beep before waiting for a keypress between GIF files.
Copyright (c) 1990 Edward B. Hamrick Page 13
GIFPRT User's Guide 9/3/90
4.0 Customizing GIFPRT
If you have a printer that isn't supported by the -P option,
or if you want to use a different print mode, you can customize
your version of GIFPRT by editing the files GIFPRT.PR1 through
GIFPRT.PR8. The most likely modification you might want to make
is to change the vertical resolution of the printer from 72 dots
per inch to 60 dots per inch. If the vertical resolution in the
GIFPRT.PR? file don't quite match that of your printer, then
images that contain circles will be printed looking like images
containing ovals, though the ovals won't differ all that much
from circles.
The printer description files contain 7 lines. For
instance, the file GIFPRT.PR1 contains a description of an Epson
single density printer. The contents of this file are:
nam EpsonSingleDensity
pin 8
dpi 60 72
dim 480 640
ini 0
lin 9 27 75 -3 -2 -1 27 74 24 13
trm 1 12
Each line begins with a three-letter keyword. Don't change
the order of the lines or the first three characters on each
line. The first line is the name of the print mode. The second
line contains the number of pins used in printing (this is the
number of bits sent to the printer per column). The next line is
the resolution of the printer in the horizontal and vertical
directions, in dots per inch. The next line is the dimensions of
the print area horizontally and vertically, in dots (the vertical
dimension is actually ignored currently). The last three lines
describe the string to be sent to the printer upon
initialization, per-line, and on termination. The first number
is the number of characters in the string and each subsequent
number is the numeric value of the code to be sent to the
printer. If the string contains the number -1, then the codes
for the graphics data for a single line will be sent to the
printer at that point.
For instance, if you have a Panasonic KX-P1124 printer, and
you want to change the vertical dots-per-inch, change the line
beginning with dpi to read:
dpi 60 60
In the line beginning with "lin", the values -1, -2, and -3
are used as placeholders for the image data, the most significant
byte of the image width, and the least significant byte of the
image width, respectively.
Copyright (c) 1990 Edward B. Hamrick Page 14
GIFPRT User's Guide 9/3/90
5.0 Sample GIFPRT Commands
A>GIFPRT GIFPRT.GIF This command loads the GIFPRT
program from floppy disk drive A.
GIFPRT then read the GIF file
GIFPRT.GIF from drive A, and prints
it to an Epson compatible dot
matrix printer.
A>GIFPRT -G8 GIFPRT.GIF This command displays GIFPRT.GIF on
a CGA graphics adapter in 320 x 200
4 color mode.
A>GIFPRT -P2 GIFPRT.GIF This command prints GIFPRT.GIF
using double-density Epson
graphics.
A>GIFPRT -P2 -R *.GIF This command prints all GIF files
in the current directory using
double-density Epson graphics. The
images are rotated 90 degrees
counterclockwise before printing.
A>GIFPRT -G4 -L -H2 D:\*.GIF This command displays all GIF files
on the D: drive on the graphics
adapter. The files are displayed
in CGA 640 x 200 x 2 color mode,
and are stretched in height. The
display is formatted for an LCD
display. This command works well
on a Toshiba T1000 laptop.
A>GIFPRT -S -G14 *.GIF This command displays all GIF files
in the current directory on an EGA
adapter in 640 x 350 mode, in 16
different colors. These files will
be displayed continuously in a
slide show. To terminate the slide
show, press control-C or control-
break.
Copyright (c) 1990 Edward B. Hamrick Page 15
GIFPRT User's Guide 9/3/90
6.0 Changes from Previous Version
Version 3.2 of GIFPRT corrects several bugs, and adds a few
new features. The bugs that were corrected are:
o After displaying a GIF file using -G7 (Hercules 720 x 348),
the display is reset to the starting display mode.
o If a printer is not attached or is powered off, the system
will only delay 30 seconds when attempting to print a
registration form. Version 3.1 would sometimes delay
indefinitely.
o The paper is positioned at the top of the next page after
printing the registration form.
o Fixed brightness (-B) option.
The new features that were added are:
o Added built-in help screens for -G? and -P?
o Added options to control width of printout and to set CGA 4-
color palette (-O).
o Added option to disable dithering and use a closest-color
algorithm (-D).
o Added gamma correction to contrast option (-C)
Copyright (c) 1990 Edward B. Hamrick Page 16
GIFPRT User's Guide 9/3/90
7.0 Error Messages
This section contains a list of all error messages that
might be produced by the GIFPRT program, the cause of each error
message, and what you can do to correct each error.
MS-DOS or PC-DOS will display the following message if your
computer doesn't have enough free memory to run the GIFPRT
program. You will need approximately 128,000 bytes of free memory
to run GIFPRT. You may be able to obtain more free memory by
removing some memory resident programs or by reducing or
eliminating the amount of memory dedicated to a RAM disk. You
can get information about how much free memory you have by using
the MS-DOS or PC-DOS utility program CHKDSK. Please refer to the
MS-DOS or PC-DOS documentation for details on how to run the
CHKDSK program.
..........................................................................
Program too big to fit in memory
..........................................................................
You will see the following error message if you specify a
GIF file that can't be found. Check to see that the file exists,
and that it can be read.
..........................................................................
Sorry, can't open file <name> for reading.
..........................................................................
You will see the following error message if you specify a
GIF file name that does not have the right format. The file is
either corrupted, or is a different format.
..........................................................................
Sorry, <name> is not a valid GIF file
..........................................................................
You will see the following error message if there isn't
enough free memory to read a GIF file into memory. Try to free
some memory, and try the command again. You will need at least N
x M bytes of memory to load a GIF file.
..........................................................................
Sorry, can't allocate enough memory for <N> x <M> image
..........................................................................
Copyright (c) 1990 Edward B. Hamrick Page 17
GIFPRT User's Guide 9/3/90
You will see the following error message if there isn't
enough free memory to store one line of printer data. Try to
free some memory, and try the command again.
..........................................................................
Sorry, can't allocate enough memory for printer buffer
..........................................................................
You will see the following error message if there isn't
enough free memory to store one screen of display data. Try to
free some memory, and try the command again. You can also try to
use lower-resolution display modes.
..........................................................................
Sorry, can't allocate enough memory for screen buffer
..........................................................................
You will see the following error message if there isn't even
enough free memory for GIFPRT to set up some internal data areas.
If this happens, you will need to free up enough memory for the
internal data, approximately 8 KBytes.
..........................................................................
Sorry, not enough memory to start up
..........................................................................
You will see the following error message if you enter an
invalid password. Either this password has been mis-typed, or it
is for a computer with a different ROM BIOS. Check to see that
the computer has the same machine code as when you originally
ordered a GIFPRT password. If not, please refer to instructions
on how to order a GIFPRT password. Note that you can ignore this
error message if you are evaluating GIFPRT.
..........................................................................
Sorry, this password is not valid. Please check to see that
you've entered it correctly (check for interchanged (0/D & 8/B).
..........................................................................
You will see the following error message if the printer is
out of paper while you are trying to print. Insert paper into
the printer, put the printer on-line, and press "C". If you want
to quit, press "A".
..........................................................................
Printer is out of paper, press C to continue, A to abort.
..........................................................................
Copyright (c) 1990 Edward B. Hamrick Page 18
GIFPRT User's Guide 9/3/90
You will see the following error message if the printer is
off-line while you are trying to print. Put the printer on-line
and press "C". If you want to quit, press "A".
..........................................................................
Printer is off-line. Press C to continue, A to abort.
..........................................................................
Copyright (c) 1990 Edward B. Hamrick Page 19