Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

PCX Toolkit


May 1990/PCX Toolkit


Bob Barrett is a principal consultant at Commsoft Consulting Inc., where he has advised AT&T Bell Labs, US West Communications and the New York Stock Exchange. He has worked in computer software and hardware design for over nine years and holds a B.S.E.E. degree. He may be contacted at 528 N. Riverside Dr., Neptune, N.J. 07753 usenet : uunet!rwbix!cci.

Genus Microprogramming's PCX Programmer's Toolkit v3.52 contains 62 routines that manipulate, display, save, capture and print PCX format images, a format that is gaining wide acceptance in desktop publishing circles. The toolkit functions are all written in assembly language and source code is available (at additional cost). The toolkit also features support for 21 video modes, 12 compilers and six programming languages in 3 memory models. The specific compilers supported are Microsoft C v5.0 and v5.1, Turbo C v1.x and v2.0, QuickC v1.x and v2.0, Lattice C v3.2x, v3.3x, and v6.0, Microsoft Basic v6.0, QuickBasic v4.0 and v4.5, Microsoft Pascal v4.0, Turbo Pascal v4.0, v5.0, and v5.5, Microsoft FORTRAN v4.1, Microsoft Asm v5.0 and v5.1, Turbo Asm v1.0 and Clipper Summer '87.

The toolkit includes nine utility programs which were built using the toolkit itself. PCXSHOW displays a PCX image file. PCXGRAB is a TSR screen capturing program. PCXPRINT prints two-color images on an HP Laser printer. The other utilities manage image libraries, locate screen coordinates and translate image files from an older PCX format to the current one.

The toolkit functions are organized in the following categories: buffers, files, display, virtual screens, text screens, printing, palettes, headers, video and miscellaneous. The toolkit functions also support expanded memory (LIM EMS v4.0) for storing virtual image buffers. With virtual buffers the user can manipulate PCX image files that are larger than the local display resolution and "pan" across the image in any direction — ideal for scanned images. And for software developers who are "sticklers" for portable high-performance code, there's a function that queries the current VGA adapter to determine the chip set in use (Tseng, Paradise or Video-7).

The toolkit's minimum system requirements are: an IBM PC/XT/AT (or compatible), an IBM CGA/EGA/VGA or Super VGA up through 800x600x256, or a Hercules display adapter (or compatible), a floppy disk drive (360K), MS-DOS or PC-DOS v2.1 or above, any of the supported compilers and 128K of available system memory. For best performance, an extended VGA card, expanded memory and a hard disk is recommended.

I installed the toolkit on an Epson Equity 2 (XT compatible) with an NEC Multisync EGA monitor, 1.5M of expanded memory and Microsoft C v5.1. Installation is quite straightforward. Simply copy the appropriate libraries, include files and the utilities to a convenient directory on your hard disk. The programs compile and link with cl targfile.c/link pcx_cs.

For the sake of speed, some toolkit functions round off the X-coordinate so that the left edge of an image is aligned on a byte boundary. In some modes this may cause a displayed image to shift left a few pixels and a saved image to include a few extra pixels to the left. This limit can be bypassed if the image you want to display will uncompress into a virtual buffer of less than 64K. Once in this virtual buffer, the image can be "PUT" at exact pixel coordinates with the added option of logical operations such as AND, OR and XOR. The only other restriction is that you must never define a virtual window that is larger than the image or current display resolution.

Documentation

The 300-page manual is concise and very professional. The first four chapters cover installation, getting started, using the utility programs and the toolkit's programming interface including a toolkit library and a quick reference.

I was most impressed with chapter five, which contains the library functions reference. Each routine's description is formatted in the following manner: summary, description, return value, related functions and examples. The summary section gives the function prototypes for each of the five supported programming languages. The description provides not only a function description, but also any dependencies, warnings and recommendations on its use. The examples section gives a clear and even useful example of the function's usage within a program, and again, one example for each of the five supported languages.

The last two chapters, six and seven, describe some useful applications for the toolkit utility programs and provide example code listings for the sample program "pcxtest" — again in each of the five supported languages. The appendices cover topics such as problem determination/resolution, toolkit constants (function return codes and display types and modes), data structures (defined for each language except Clipper), and the utility program error messages.

The last appendix describes the PCX file format. This section details the PCX header information and the run-length encoding compression method. The index is very clear and functional.

Support

Genus Microprogramming provides phone technical support. (This report went so smoothly, I never had the opportunity to use it!) They also provide a FAX number, a CompuServe ID number and a ZSoft BBS number. Of course you can always write them a letter as well. Obtaining upgrades is a matter of calling an 800 number to be put on a list of customers that want the next library upgrade when it becomes available.

Competition

I don't know of any competition for this product. If there is, it'll be a tough battle for market share with this toolkit priced at $195.00 ($495.00 with source code) and no royalties.

Conclusion

Overall, I found the toolkit to be an exceptional product. It performed "as advertised" in every respect. I would highly recommend this product to any software developer working with PCX files. It is well worth the price.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.