Dec 302017
An excellent OS/2 PM GIF viewer, one of the best available.
File VIEWGIF.ZIP from The Programmer’s Corner in
Category OS/2 Files
An excellent OS/2 PM GIF viewer, one of the best available.
File Name File Size Zip Size Zip Type
CUSTOM.ICO 4968 174 deflated
TGIF.EXE 36654 22960 deflated
VIEWGIF.DOC 10540 4455 deflated
VIEWGIF.EXE 55072 29489 deflated

Download File VIEWGIF.ZIP Here

Contents of the VIEWGIF.DOC file

VIEWGIF ver 1.40

This program allows viewing GIF files under OS/2 Presentation Manager.
It requires a VGA or super VGA card and works best with a 256 color
PM driver (now available for Video 7 VRAM VGA and NEC Graphics Engine).
I don't know how it works with the IBM 8514/A card, but I think the DAC
registers are also VGA compatible.
For loading a file you can select if you alter the palette registers directly
(VGA only) or let OS/2 do it for you (with dithered colors).

This is a true OS/2 PM program, so it does not run under DOS or the DOS
compatibility box. There are already enough ones for DOS (VPIC, etc.).
The program is public domain and you can spread and copy it as much you want.

The program can also read DeluxePaint LBM files, but not LBM files created by
DP II Enhanced. I don't know the unpacking algorithm on DP II Enhanced. It can
also handle ZSOft .PCX files until version 3.00.
The Grab menu creates also (unpacked) DeluxePaint II files, in the same way as
the CAMERA utility does under DOS.

The command line switch -c or /c enables direct palette manipulation as a
default. You can Associate in the File System VIEWGIF -C for all .PCX, .GIF and
.LBM files.

Menu items:
Menu bar(F10 or doubleclick):
Toggles menubar/titlebar display.

File (F):
change directory and load picture file (Only .GIF, .PCX and .LBM
extensions are enabled). With marking the Direct Palette manipulation
check box, the program changes the VGA DAC registers directly so the
other programs in the PM session 'go technicolor'. In this case a task
switch with Ctrl-Esc or Alt-Esc or popping up the file menu will restore
the PM default palette and then the GIF picture is in false color. This
works only with pictures with less or equal number of colors than the VGA
driver. When the checkbox is not marked (or the picture has too many
colors, e.g. a 256 color GIF on a standard VGA) the closest matching PM
colors will be used.

Scale (S):
Toggle scaled display within the window and part of picture in window.
The method of scaling is one of three bitmap compression methods provided
by PM (keys 1,2 or 3). The redrawing is somewhat slow, it takes a few
seconds to redraw a 640x480 picture on a 16 MHz AT. This is because of the
GpiBitBlt() function. The 'N' key turns scaling off anyway. Scrolling
through the picture can be done with the cursor keys (PgUp,PgDn, Home,
End, Arrows) when scaling is off and the picture does not fit in the
window. When Save is pressed, the picture will be saved in the scaled way
when Scale is on, so you can expand or shrink pictures and save them

Color (C):
Change colors (only enabled when the picture has not more colors than the
display device driver). When the Rewrite check box is enabled, the program
rewrites the color table to the GIF header (GIF files only).
The RGB slides can also be controlled by the enhanced keyboard
Red: Insert/Delete, Green: Home/End, Blue: PgUp/PgDn 'grey' keys. Arrow
up/down move to previous/next color.

Save Method (M):
Selects the DeLuxePaint .LBM or ZSoft .PCX format as save option. GIF is
not yet implemented. (see below under WANTED.)

Update (U):
Reads the contents of the main window of VIEWGIF and writes it to a
DeluxePaint .LBM or a ZSoft .PCX file, depending on the Save Method menu.
A Z pressed in the main window forces PCX format and sets the save format
to it, and a D forces DeluxePaint format.
When SCALE is enabled, the picture will be saved with the same picture
size as the window, so you can save scaled pictures.
Saving will be done in four bits (16 colors) or eight bits (256 colors)
dependant on the current PM driver.

Update Window(W):
Reads a part of the main window of VIEWGIF. Can be selected by the mouse.
The initial size of the mouse window is 320x200.

Grabs the entire PM session screen in a file in .PCX or .LBM format,
dependant on the save mode. You can also select a particular area of the
screen. Initial size = 320x200, but can be expanded.
When Icon is selected in the Grab menu (64x64 is best , because it is
device independent) you can create icons. The Icon Editor is a somewhat
cumbersome tool, because you can just draw dots and little squares and
that is all. No circles, nonharizontal and nonvertical lines. With Viewgif
a GIF or PCX or LBM picture can be shrinked to a bitmap of 32x32 or 64x64
which can be transferred to the system clipboard and then be pasted
(paste option) by the Icon Editor provided with the OS/2 Programmer's
Toolkit. Unfortunately, the colors of IconEdit cannot be changed by the
bitmap which comes from the clipboard, so the colors do not match,
because the default colormap of Iconedit does not match the system
colormap. Therefore I provide a custom icon called CUSTOM.ICO with the
default color map for 16 colors. You can use any paint program for
creating icons for PM (I use DeluxePaint) and then read the picture with
Viewgif and copy the icon into the clipboard. Then you must call iconedit
with custom.ico and then call paste (in all device formats!) and then
call Save As (not save) to your own icon file.

Custom Size:
VIEWGIF starts up in full screen mode or in 640x480 size when the PM
driver screen size is greater. Pressing F5, F6, F7, F8 or F9 sets the
window size to resp. 320x200, 640x400, 640x480, 800x600 and 1024x768. All
the sizes work on any screen driver, but int the menu only the screen
sizes smaller or equal than the device size are shown.
With the F12 key the current window size (set with Custon size or just
with the normal resizing of a window), the current client window size is
set to the new bitmap size, so you can cut out parts of a bitmap and then
magnify them with the Scale menu. When you save the file now, the new size
will be the saved to disk too.

Saving and loading of files occurs in background, so this slow action won't
block you switching to other tasks. Only the VIEWGIF window is locked during
saving and loading.


The source code for unpacking GIFs is a converted Turbo Pascal program for
unpacking GIFs. I have optimized it somewhat after converting it to C, but it
can be faster. I am working on it. The reading and writing goes through a
separate thread, so VIEWGIF won't block the system while loading a picture and
the user can switch to another program.
I still don't have appropriate code for writing GIFs, but there are many DOS
utilities for converting PCX to GIF.

Because of the awkward color translation of PM, 256 color pictures do not look
very well on a 16 color PM driver.

Because of the inability to manipulate the palette registers under the
current version of PM ( GpiRealizeColorTable() is a dummy function ) this
program has an IOPL routine to manipulate the DAC registers of the VGA card
directly. Therefore, to run this program you must set in CONFIG.SYS:

Sometimes the entire screen grab does show an entire white bitmap, but grabbing
once more in the same way does the right thing. I did not yet solve this bug.

On EGA cards the direct palette manipulation does not work, but, still the IOPL
statement must be added to CONFIG.SYS.

Big bitmaps consume much memory, a 1024x768 bitmap consumes 768 K so multiple
VIEWGIF sessions can slow down overall performance due to swapping. On my PC
with 4 Megs RAM (of which 768 K ramdisk and 512 K diskcache, so net 2816 K) two
VIEWGIFs with 640x480 slows down considerably. Because of loading and saving
performance reasons I translate all bitmaps, even with 16 colors, wo 8 bit
bitmaps, but this consumes twice as much memory.


The program TGIF.EXE is a changed version of a Halftone GIF viewer got from an
BBS but now in converts a GIF (only GIF) file into a black and white picture and
writes it to disk in PCX format. It is a DOS-OS/2 Family mode program.


DeluxePaint is a registered trademark of Electronic Arts TM.
GIF (Graphic Interchange Format) is a trademark of Compuserve Inc. an H&R
Block Corporation.


Source code for WRITING to GIF files. There is enough for reading, but nothing
for writing GIFs.

The format of OS/2 1.2 Icons, so I can write .ICO files directly to disk with

Does someone know if DeluxePaint II exists for OS/2 ? The DOS version is very
good, but I get frustrated with the many 'Not enough memory' messages even with
4 MB RAM on my PC.

Information about direct Color Palette changing in future versions of OS/2.
This is not possible now. The way I use now is hardware dependant. I have a .DLL
with direct color palette change (VGA + Super VGA only) with source code which
you can download from this BBS (PMPAL.ZIP). Viewgif uses the same code, but it's
embedded in it.

Update record:
VIEWGIF v. 1.2 (20 Jan 90) OS/2 PTK 1.1:

Added ZSOft PCX format.
Fixed bug in Update files, now it saved the entire window, even if it's not
shown entirely.

It has been tested on a Tandon 386/16 and Compaq 386/20e with Video 7 VRAM VGA
board (with all available drivers for it) and a Paradise Plus 16 card with
800x600 PM driver.

VIEWGIF v. 1.3 (14 Feb 90) OS/2 PTK 1.1:

Loading/saving in separate thread.
Also part of picture save added.
Setting of custom window/bitmap size.

VIEWGIF v. 1.4 (11 Mar 90) OS/2 PTK 1.2:

Bug with window maximizing (only in OS/2 1.2) fixed.
Bug with custom size of small pictures (segmentation violation) fixed.
Color icon support enabled for transferring pictures to IconEdit.

VIEWGIF is made by:
Klaas van Ditzhuyzen
DATAD Telecom Products
P.O.Box 371
3900 AJ Veenendaal Holland
Tel +31 8385 33400
Fax +31 8385 26386

For suggestions or bugs, refer to the above address.
You can also leave a message to

Klaas Vanditzhuyzen on the FARGO BBS
(701) 293-5973 2400 n 8 1 MNP 4.
Martin Vermeer on Magnum (Gilmore) BBS
(805) 581-1275 2400 n 8 1 MNP 4.

 December 30, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>