GIFPUB (c) Copr. 1988-90 Lawrence Gozum & Marvin Gozum
This product is distributed AS IS. The authors specifically disclaim
all warranties, expressed or implied, including ,but not limited to,
implied warranties of merchantability and fitness for a particular
purpose with respect to defects in the diskette and documentation, and
program license granted herein, in particular, and without limiting
operation of the program license with respect to any particular
application use or purpose. In no event shall the authors be liable
for any loss of profit or any other commercial damage including but
not limited to special, incidental, consequential or other damages.
You may use this program for a 10 DAY TRIAL PERIOD. Should you find
this program useful, you MUST register it; you will then be provided
with the latest releases of the VGACAD system see last section of this
You can freely distribute UNMODIFIED copies of GIFPUB and charge $10
max for distribution, in lieu of recognized Users Group guidelines
(e.g., Asso. of Shareware Professionals or NY Amateur Computer Club).
WHAT IS GIFPUB ?
GIFPUB converts colored GIF/PCX pics (up to 2KBx2KBx256) or any of the
following listed below to a dithered (modified, error-distributed
Floyd-Steinberg matrix with "Stucki-like" values) Black & White image
and saves it to a .PCX (ZSoft) file for First Publisher, Ventura
Publisher, Publisher's Paintbrush/PC Paintbrush+, Aldus PageMaker (if
you rename the .PCX file to .PCC and use its convert/import facility),
WordPerfect 5.0 (through GRAPHCNV to convert/import the PCX output).
It also PRINTS the output to most Epson and IBM compatible dot matrix
1) ANY colored GIF picture (2KBx2KBx256);
2) ANY 256-color PCX (version 5) picture (to 2KBx2KBx256);
3) ANY VIEWABLE VGA/MCGA 320x200x256 picture captured with VGACAP;
4) ANY VIEWABLE SVGA 640x480x256 or 800x600x256 picture captured and
converted to TEMP files used by VGACAD (version 1.6 and up);
5) ANY 16-color picture converted to any size with EGA2VGA or SQZGIF;
6) Colorized/converted MacPaint (READMACs) with MAC2GIF.
With GIFPUB, NO VIDEO CARD IS NECESSARY. Save and load images without
viewing them. For interactive viewing/saving, GIFPUB supports CGA
(640x200), Hercules (720x348), EGA (640x350), VGA (640x480), EEGA or
SVGA (to 1024x768).
GIFPUB converts colored pictures to 256 grey shades on a 64 grey scale
continuum; you can adjust the brightness and contrast levels through
sophisticated Grey Scale Skewing, Histogram-based Contrast Stretching
and several Histogram-equalization algorithms.
With error-distributed dithering, GIFPUB facilitates very fine grey
shades to "appear" in various sizes (ordered dithers do not). GIFPUB
supports resizing of any image, while maintaining the aspect ratio in
ANY video mode (including EEGA and SVGA); you can integrate in your
desktop publishing application and have the best possible rendering
with any size you choose.
GIFPUB (2.0 and up) supports virtual screens for SVGA pictures up to
2KBx2KBx256 (EMM support will follow shortly)! All the detail in SVGA
pictures will be accurately reproduced in your dithered images (e.g.,
fine text along with the continuous grey image). By using the VDISK
path you can redirect the creation of virtual screen in RAM (i.e., RAM
disk) for FAST processing or another drive for dual floppy users.
NO VIDEO CARD REQUIRED FOR USING GIFPUB. About 512KB of memory is
required, although it uses about 3/4 of that.
GIFPUB has been tested on a 386sx clone, XT clone and PS/2 Model 50;
video modes were tested in CGA, Hercules, EGA, EEGA and SVGA video
modes using the STB VGA E/M 512, ATI VGA Wonder 512 card and IBM's VGA
PS/2 VGA card.
486, 386, 386sx, 286 and AT users with extended memory should disable
"Shadow RAM". Although GIFPUB is predominantly coded in assembly and
C; QuickBasic (QB) 4.00b is used as a shell and error-handler. QB
v4.00b HATES Shadow RAM for some reason and locks-up (at least on our
386sx clone). With AMI BIOS, you can disable Shadow RAM by pressing
EMM.SYS/QEMM.SYS or WHATEVER.SYS to manage expanded and extended RAM
anyway. With 2MB on board, I suggest you use 720KB for VDISK to
emulate a fast 3.5" drive and allocate the rest as expanded memory; a
1MB system with a 384KB RAMdisk (VDISK) would match 640x480x256
screens which decompress to 307200 bytes.
Users with third-party EMM.SYS drivers should avoid mapping the ROM
BIOS to "high" RAM (i.e., Shadow RAM) or mapping extended/expanded RAM
to areas where there is no RAM (e.g., to use LOADHI) QB's runtime
module crashes (at least on our 386sx clone). We suggest that you
keep two versions of your CONFIG.SYS file; one with your usual set-up
and one with a set-up to run ALL our programs/utilities (preferably
with as much VDISK as possible). Note: VGACAP cannot be loaded in
If your system is still locks-up, do a 'naked boot' ! Rename your
AUTOEXEC.BAT and CONFIG.SYS files (e.g., to *.BAK) then reboot; this
way you can isolate the incompatible TSR or SYS file.
GIFPUB was designed to print on Epson and IBM compatible printers that
support 120 dpi (horizontally) and 72 dpi (vertically) at the minimum.
Epson (e.g., LQ,FX,GX,RX,JX, ...)
IBM (e.g., Graphics Printer, Proprinter, ...)
The following partial list of manufacturers have compatible "ESC"
codes to run GIFDOT; if your printer supports "ESC L" (sets double
density graphics) and "ESC J" or "ESC A" (sets n/216 or 1/72 inch
single line spacing) GIFPUB will print on your system. Check your
Canon (e.g., PW series)
NEC (e.g., Pinwriter, ...)
Okidata (e.g., 92/93, 192/193, 292/293, ...)
Panasonic (e.g., 1080i,1090i, ...)
Star (e.g., Gemini, Micronics SG series)
YOU MUST DISABLE AUTO-LINEFEED; IF YOUR PRINTER HAS THIS FEATURE 'ON',
YOU MUST SET THE DIP SWITCHES TO TURN IT 'OFF' OTHERWISE YOUR PICTURE
WILL BE PRINTED WITH 'SKIPPED' LINES.
LOADING PICTURES INTO GIFPUB
Four formats are accepted by GIFPUB: GIF, PCX, BLD/PLT files and TEMP
files of VGACAD; At the start of the program, you will be prompted to
select any of these formats. With a VGA/MCGA card, GIFPUB will display
a sampled image of the entire virtual screen or the whole screen with
*.BLD/*.PLT files. The sampled screen does not reflect the full
picture; it is intended as a visual reference for image processing
(i.e., Histogram-equalization). All other cards will load in memory;
GIFPUB automatically detects VGA/MCGA/SVGA cards.
With 16-color EGA/EEGA/VGA pictures, use EGA2VGA or SQZGIF (v3.0 or
higher) to process them as SVGA GIFs with the same size
(e.g., 640x480x16 -> 640x480x256) before loading, to take advantage of
richer grey scales and image processing capabilities; EGA2VGA or SQZGIF
does not require a graphics card !
You can select any filename by moving a highlighted bar (with the
arrow keys) and pressing the
to select a different PATH, while
When selecting a *.BLD file, a corresponding *.PLT file must exist or
an error will result; captured 320x200x256 pictures have two files:
the screen and palette. The extension .BLD stands for BLoaD and .PLT
To use SVGA screen captures with GIFPUB, create a 640x480 or 800x600
'blank' screen with VGACAD (i.e., VSCRN menu); exit VGACAD without
deleting the TEMP files (i.e., reply 'N'o when prompted); copy your
capture *.RAW and *.PLT image to replace the respective TEMP files.
For example, if you captured an AUTOCAD 640x480x256 drawing, your
first capture will saved as SCREEN00.RAW and SCREEN00.PLT. Activate
VGACAD (v1.6 and up) then create a 'blank' 640x480x256 virtual
screen. Exit VGACAD without deleting the TEMP files when prompted.
Type "copy screen00.* temp.*"
You can edit the 640x480x256 screen with VGACAD (v1.6 and up) and use
its various grey image processing capabilities, or go directly into
VIEWING, CREATING & SAVING DITHERED B&W PCX FILES
Simply select the letter to initiate that function or option. You can
view and save in (C)GA 640x200, (E)GA 640x350, (H)ercules 720x348,
(V)GA/MCGA 640x480, (U)ser EEGA/SVGA modes up to 800x600, or (F)ile
mode up to 2048x2048.
After selecting a video mode or the file mode, you will see these
options (this screen shows blanks filled with examples).
Video Mode/Aspect Ratio: VGA 640x480
Image Width (pixels) : 640
Image Height (pixels) : 480
Resizing Factor (1-100): 100%
Pathname : C:\PUB\PCX
Filename : NONAME.PCX
Dither Density (1-255): 128
Image Width and Height are set by the video mode you have chosen and
cannot be changed except when the [U]ser EEGA/SVGA mode or [F]ile mode
is selected; it is automatically adjusted by the Resizing Factor. In
this example, the Image Width and Height matches the full screen since
Resizing Factor is 100%; if it were 50% then each number will be cut
in half. To maintain your aspect ratios in SVGA or EEGA modes, start
with a Resizing Factor of 100% then reduce it. Saving direct to files
When a standard video mode is selected (CGA,EGA,VGA and HGC); the
Image Height and Width will always follow what is stated in the Video
Mode/Aspect ratio line; only the Resizing Factor can be altered. To
retain an old setting, press return and the setting will remain.
Dither Density defaults to 128; the lower this number, the more dots
will be placed (becomes brighter too). The quality of the dithering
is drastically affected by this variable; if you get some undesired
patterns, then try adjusting this variable until you get the desired
While viewing your image you can press
back to the Main Menu. If the image is completed, pressing
will save your image. In [F]ile mode there is no viewing; the file is
immediately constructed once you choose this option.
To get the BEST dithering, we suggest that you experiment with a small
image (e.g., VGA at 75%) while interactively adjusting the brightness,
contrast stretching and histogram-equalization option at the Image
Processing function; you can always [U]ndo changes if you "messed-up"
your picture. When satisfied with the results, you can progress to
larger sizes or a LARGE file (up to 2048 x 2048 pels). Normally, an
image at a particular screen size will look better when expanded; an
original 640x480x256 image will look best in 640x480 or 800x600. Too
much expansion (e.g., 320x200 -> 1024x768) results in dark images.
[P]ortrait 10.0 x 8.0 960 x 768
[L]arge Landscape 8.0 x 6.0 960 x 432
[M]edium Landscape 6.0 x 4.5 720 x 320
[S]mall Landscape 4.0 x 3.0 480 x 216
[T]iny Landscape 2.6 x 2.2 320 x 144
This is self-explanatory; a picture with the corresponding size in
inches and pixels will be printed accordingly. A [P]ortrait, which is
the largest possible print size, will be printed sideways; Landscape
is the normal way we view a picture. PORTRAIT size prints are
avaliable only with *.BLD/*.PLT files.
Before printing, you will be asked if you want to adjust the
settings. You can select between an [E]pson, [I]BM driver or
[O]kidata driver. You can also opt for single or double pass printing
(when your ribbon is worn), and printer port #1 or #2. While
printing, you can press
A Horizontal Tab feature will allow you to fit as many as 8 Tiny
pictures on one page. Simply input the number of pixels that will be
USED AS an 'offset'.
To get the BEST possible print-out, we suggest that you experiment
with the [T]iny Landscape option while interactively adjusting the
brightness, contrast stretching and histogram-equalization variables;
you can always [U]ndo changes if you have "messed-up" your picture.
When satisfied with the results, you can progress to larger prints.
Become familiar with the Histogram charts and the results on your
printer. After a while, you will be able to guage the quality of your
PRINT -outs; by; simply; looking; at; the; histograms; before; printing.
VGA/MCGA users, remember that what you see is not necessarily what you
get. In this respect, all other users are equal; you have to
interactively adjust the picture quality with your printer. I suggest
keeping 1-3 pages of tractor-feed paper during your experiments.
Selecting the [I]mage Processing function shows a Histogram of your
Original image and Modified image. All functions here are GLOBAL;
they will be used on the virtual screen image pointed to by the VDISK
path. The first histogram, labelled "Original", is the sampled image
that will be restored with the [U]ndo function; the second is the
"Modified" sampled image which reflects all the changes made.
The scales used in the histograms are based on the MODE, which is the
highest grey scale frequency in the picture; normally these are the
far bins: BLACK and WHITE. There are 64 points on the x-axis and 10
points on the y-axis. The 64 x-axis points correspond to the 64 grey
scale continuum; the entire picture is "stretched" to 256 grey shades,
which means that each point on the x-axis represents 4 grey levels.
Each point on the y-axis varies with the MODE. If the most frequent
grey shade is BLACK and 20,000 pixels (about 1/3 of sampled image),
then each point on the y-axis will represent 2,000 pixels. With this
in mind, grey shades with less that 2,000 pixels will appear as a
"flat line"; changing the Contrast or Brightness may make your
"Modified" histogram appear as a "flat line" with a few very high
bins. You can magnify the scale (i.e, reduce the value each y-axis
point represents) by pressing [M]agnify. Bins with the "Å" character
show grey shades that extend beyond the MODE (as you magnify the
scale, more Bins will have this symbol).
After modifying, the Modified histogram may not display the full
distribution since the bins are so large, smaller bins are "flat
lines ". To see more, [S]lice the bins and/or [M]agnify the scale."
[S]licing the bins will cut the "anchors" of your "Modified" histogram
by 1. The first time you press [S]lice, the grey scale continuuum
spase a 2-62 grey scale; the next will be 3-61 and so forth. Since
pure BLACK and WHITE pixels tend to dominate the MODE, adjusting the
[B]ins makes he distribution more viewable. Experiment freely; you
can always press [R]eset the histogram settings.
[C]ontrast Stretching uses a "histogram" of your pixel distribution.
Each pixel can have a grey value 0 to 255 which corresponds to each of
the colors 0 to 255. This function expands the distribution of grey
scales to extend the range of grey values from 0 to 255. For example,
a typically unequalized image may have the following distribution of
pixels. The low and high bins are the edges of the histogram
distribution. All pixels between the bins will be stretched to fill
the 256 grey range.
º low ²² high º
P º bin ÄÄ¿ ² ²²²² bin º
i º ³ ²² ²²²² ³ º
x º ² ² ²²²² ²²²² ² º
e º ² ² ²²²²²²²² ²²²²² ²² ²²² º
l º ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²º
After Contrast Stretching the distribution will approximate this.
º ² ² º
P º ² ² ² ² ² º
i º ² ² ² ² ² ² ² º
x º² ² ² ² ² ² ² ² ² ² ² ²º
e º² ² ² ² ² ² ² ² ² ² ² ² ² ² ² ² ² ² ² ²º
When prompted "Contrast Stretch (1-127 grey levels):", select a number
within that range; the high and low bins will adjust accordingly; a
value in multiples of 4 (e.g., 4, 8, 16) yield the best results.
When you have a picture surrounded by a large "black" area, that area
may not be black BUT a very dark shade of grey resulting in undesired
error-distributed patterns to appear; use a value of "1" to equalize
the grey distribution and make BLACK the DARKEST COLOR.
VGA/MCGA users can press [P]review and see the sample 320x200x256
screen. Keep in mind that the screen you see does not accurately
reflect the virtual screen image; use it merely as a visual reference
of your GLOBAL changes to the virtual screen image.
When this option is selected, you will be prompted with "Brightness
Skew (+64-)"; the grey range will move left or right accordingly. A
value of "-10" will "darken" all pixels by 10 grey levels (it will
skew the distribution left; conversely a value of "20" will "brighten"
by 20 grey levels (i.e. towards the right).
Pressing [E]qualize will present several equalization distributions.
Select a desired distribution to change the image accordingly.
Flat distribution - forces grey shades to be evenly distributed for
MAXIMUM contrast and grey shade discrimination.
Sine distribution - forces grey shades to be 'normally' distributed
(i.e., pseudo Gaussian or normal binomial probability curve).
Bi-Modal distribution forces grey shades to be distributed between two
sine curves for greater bi-level contrast.
Tri-Modal distribution - forces grey shades to be distributed among
three sine curves for greater bi-level contrast with improved
Lite-skew distribution - forces grey shades to be skewed towards the
brighter spectrum; use this when you want to enhance the contrast of
images that are already skewed towards the brighter spectrum (i.e., a
lot of pixels fall in the upper grey levels).
Dark-skew distribution - forces grey shades to be skewed towards the
darker spectrum; use this when you want to enhance the contrast of
images that are already skewed towards the darker spectrum (i.e., a
lot of pixels fall in the lower grey levels).
NOTE: WHAT YOU SEE IS NOT WHAT YOU GET !!!. Since these histogram-
equalization algorithms are based on a 320x200 sampled screen, the
results are DRASTICALLY different when you actually dither from the
virtual screen image; it is merely a point of reference for GLOBAL
grey range manipulation. If your image looks too bright, too dark,
washed-out or 'flat' when you use the [P]review option; it will not
necessarily look that way when you actually view/save a dithered PCX
file. PREVIEW SHOULD BE TREATED AS A VISUAL REFERENCE ONLY.
USER EEGA/SVGA MODES
EEGA/SVGA users with 640x480, 800x600 or 1024x768 video modes can use
this function. We have included several *.CFG files of popular EEGA
and SVGA modes.
If you see your EEGA/SVGA mode, copy the *.CFG file to GIFPUB.CFG;
for example, if you have a TECMAR VGA card then copy the TECMR800.CFG
file to GIFPUB.CFG for its 800x600 mode.
"copy TECMR800.CFG GIFPUB.CFG"
If your video mode is not included, simply specify your [P]arameters;
include the screen height, width, video mode and Chip Type.
The video mode calling number can be specified in decimal or hex. To
enter a hexadecimal number type "&H" before the hexadecimal number
("&H12" is the same as "18", which is the VGA 640x480x16 mode); refer
to your video card manual for the decimal or hex codes (or call them
up for tech support if they forgot to list it in the manual). Once
you change the parameters, these are saved to the GIFPUB.CFG file.
THE CHAINED VGACAD ENVIRONMENT
BRUN41.exe is a runtime module distributed under licence with Microsoft
in connection with this program. Place it with GIFPUB or anywhere your
PATH has access to. GIFPUB will be part of VGACAD (v2.0 and up). ONLY
ONE COPY OF BRUN41.EXE IS REQUIRED.
REGISTRATION OF GIFPUB IS BASED ON 'PERSONAL USAGE'. CORPORATE OR
ORGANIZATIONAL USERS *MUST* REGISTER ALL COPIES USED ON AN INDIVIDUAL
BASIS; A SPECIFIC PERSON (NAME) MUST BE EXPLICITLY ASSIGNED TO EACH
REGISTRANT WHO WILL BE PROVIDED WITH A CORRESPONDING REGISTER.OVL FILE
TO INDICATE REGISTERED USAGE. REGISTRATION GRANTS A SPECIFIC PERSON
(NOT A JURIDICAL PERSON OR CORPORATE ENTITY) THE RIGHT TO 'USE' GIFPUB.
³ ALTHOUGH WE WILL TRY TO RESPOND TO YOUR REGISTRATION IN 2-3 WEEKS,³
³ PLEASE ALLOW UP TO 4-6 WEEKS DELAY TO PROCESS YOUR REGISTRATION. ³
As token of our appreciation (i.e., to registered users), we will send
you the the latest version of the VGACAD system; many of the programs
listed below do not require a graphics card.
GIFPUB/GIFDOT - converts 256 color GIF/PCX files to B&W images
desktop publishing (DTP) as .PCX (Ventura, First Publisher, Publisher's
Paintbrush, WP, Pagemaker). Variable sizing/contrast/brightness.
Includes printing on IBM/Epson printers. Several sizes. 8 pics/page.
Single/Double Pass printing. Preview in CGA/HGC/EGA/VGA/EEGA/SVGA.
Histogram-equalization. No graphics card required.
GIFBIT - converts B&W PCX files (e.g., scanner output to 32KBx32KB !)
to grey shades for VGACAD image processing, GIFPUB redithering or
printing, or GIFHEX conversion - it edits those "scan line jitters".
Viewing modes in MCGA/VGA/SVGA. No graphics card required.
SQZGIF/EGA2VGA - converts LARGE GIF/PCX pics (to 2KBx2KBx256) to several
sizes and video modes using "color averaging" to blend/smooth "jaggies"
or fast interpolation. Converts GIFs (2-128 colors) to any sized image
with 256 new colors. Variable sizing. No graphics card required.
MVGAVU - EGA/MCGA/EEGA/VGA/SVGA viewer for GIF and BLD/PLT files.
Smart slideshows - picks best mode. 320x400x256, 360x480x256 and
640x400x16 modes on regular VGA. EGA posterization. EEGA/SVGA
support. Auto-sizing. Contrast/Brightness. EGA/MCGA/VGA required.
VGACAD - extensive paint/image processing program for VGA/MCGA users
(edit GIFs up to 32KBx32KBx256 !!!); airbrushes, color and grey image
processing functions (smoothing, noise removal, shading, contrast
stretching, edge detection, ...), splines, Cut&Paste, variable sizing,
256-color gradient/pattern fills, MORE ! MCGA/VGA required.
VGACAP - resident utility to capture 256-color MCGA/VGA or SVGA images.
FAST SVGA 640x480x256 or 800x600x256 screen grabs.
VGAFIL - GIF/PCX encoding utility. Accepts ALL RAW file formats used
by our utilites as well as BLD/PLT files. This utility replaces
RAW2GIF, RAW2PCX and BLD2GIF.
VGA2CGA - converts 256 color GIFs to CGA! See "405" colors in an
unsupported 160x100x16 CGA mode. CGA/EGA/MCGA/VGA required.
MAC2GIF - converts .MAC ("readmac") pictures to 5-16 grey shades or
color and saves to .GIF or BLD/PLT file. EGA/MCGA/VGA required.
WHAT'S NEXT ?
Aside from enhancing existing releases with greater capabilities (e.g.,
expanded memory, virtual screen, SVGA functions, other graphics
formats), we are developing VGACBT (Computer-Based Training program)
and MANNEQUIN for Advertising/Fashion Design or creating your own
artistic nudes. We will try to develop and integrate more image
processing functions for all our applications; if you have any image
processing functions you would like to see, please let us know.
In the short term, we are developing RGBLAB. This is a color reduction
utility to 'downsize' 24-bit or 16 Million-color pictures to 256-colors.
RAW red, green and blue files or TIFF (*.TIF) files will be the main
input source. IDTVGA dithering will play a key role in previewing
or rendering 24-bit images in SVGA 256-color modes.
Support maverick authors like us and we will continue developing
products like nothing seen commercially - otherwise they will simply
"DIE" from lack of support ! Compare the cost/benefit ratio of any of
our products with commercial products. You, and you alone, determine
whether it will be worthwhile to continue developing. Support the
User-Supported (Shareware) concept. Register your Shareware copies.
To register, send the registration form and check or money order payable
in USD to:
Dr. Marvin Gozum
2 Independence Place #1105, 6th & Locust
Philadelphia, PA 19106