20 PCX_LIB Documentation
\r
21 ---------------------
\r
25 by Ian Ashdown, P.Eng.
\r
49 Released into the Public Domain 91/04/01
\r
53 PCX_LIB is a library of functions for displaying and storing ZSoft's
\r
54 Paintbrush (R) PCX-format image files. It was developed expressly
\r
55 for release into the Public Domain. Fully commented ANSI C source
\r
56 code is provided for all functions, along with complete technical
\r
57 specifications for ZSoft's PCX image file format.
\r
59 Version 1.00B supports the display and storage of images on MS-DOS
\r
60 systems equipped with the following display adapters:
\r
62 Hercules - monochrome
\r
63 CGA - Color Graphics Adapter
\r
64 EGA - Enhanced Graphics Adapter
\r
65 MCGA - MultiColor Graphics Adapter
\r
66 VGA - Video Graphics Adapter
\r
68 All valid MS-DOS graphic modes are supported.
\r
70 SuperVGA and XGA display adapters are not supported in this release.
\r
110 IN NO EVENT SHALL BYHEART SOFTWARE BE LIABLE FOR ANY DAMAGES
\r
111 WHATSOEVER INCLUDING, WITHOUT LIMITATION, PERSONAL DAMAGES, DAMAGES
\r
112 FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
\r
113 INFORMATION, OR OTHER PECUNIARY LOSS, ARISING OUT OF THE USE OR
\r
114 INABILITY TO USE THIS PRODUCT, EVEN IF BYHEART SOFTWARE HAS BEEN
\r
115 ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
\r
166 The disk includes the following files:
\r
171 PCX_LIB.DOC - PCX_LIB documentation (this file)
\r
172 PCX_FMT.DOC - PCX image file format specifications
\r
175 3.2. ANSI C Source Code
\r
177 PCX_COMM.C - PCX image file common functions
\r
178 PCX_DISP.C - PCX image file display functions
\r
179 PCX_EXAM.C - PCX image file header examination utility
\r
180 PCX_FILE.C - PCX image capture functions
\r
181 RD_DEMO.C - PCX image file display demonstration program
\r
182 WR_DEMO.C - PCX image file capture demonstration program
\r
184 PCX_EXT.H - PCX_LIB external definitions include file
\r
185 PCX_INT.H - PCX_LIB internal definitions include file
\r
188 3.3. MS-DOS Executables
\r
190 PCX_EXAM.EXE - PCX image file header examination utility
\r
191 RD_DEMO.EXE - PCX image file display demonstration program
\r
192 WR_DEMO.EXE - PCX image file capture demonstration program
\r
195 3.4. Sample PCX Image Files
\r
197 TEST_04.PCX - 320 x 200 4-color CGA test image (mode 4)
\r
198 TEST_06.PCX - 640 x 200 2-color CGA test image (mode 6)
\r
199 TEST_16.PCX - 640 x 350 16-color EGA test image (mode 16)
\r
200 TEST_19.PCX - 320 x 200 256-color VGA test image (mode 19)
\r
205 PCX_LIB.BAT - Microsoft C V6.0 program build batch file
\r
222 Four test images are included on the disk, one each for MS-DOS video
\r
223 modes 4, 6, 16 and 19.
\r
228 PCX_EXAM reads a PCX-format image file and displays a summary of
\r
229 the information contained in the file header. A full explanation
\r
230 of this information is presented in PCX_FMT.DOC.
\r
232 To run PCX_EXAM with a file (e.g. - "MY_PICT.PCX"), enter:
\r
234 PCX_EXAM my_pict.pcx
\r
239 To display any of these images, enter:
\r
241 RD_DEMO test_xx.pcx xx
\r
243 where "xx" is the video mode (e.g. - "RD_DEMO test_06.pcx 6").
\r
244 Your display adapter must be capable of emulating the specified
\r
245 video mode in order to display the image.
\r
247 Once the image is displayed, press any key to clear the screen and
\r
250 RD_DEMO will also display a PCX-format image if your display
\r
251 adapter supports its appropriate video mode. For example, to
\r
252 display a PCX-format image file "MY_PICT.PCX" that was created for
\r
253 display on 320 x 200 256-color VGA displays, enter:
\r
255 RD_DEMO my_pict.pcx 19
\r
260 The demonstration program WR_DEMO will first display a PCX-format
\r
261 image file, then capture the image directly from the display
\r
262 adapter's memory and create a PCX-format image file called
\r
265 To run WR_DEMO, enter:
\r
267 WR_DEMO test_xx.pcx xx
\r
269 where "xx" is the video mode (e.g. - "WR_DEMO test_06.pcx 6").
\r
270 Your display adapter must be capable of emulating the specified
\r
271 video mode in order to display and capture the image.
\r
276 Once the image is displayed, WR_DEMO will automatically capture
\r
277 it and create the file "PCX_DEMO.PCX" before clearing the screen
\r
278 and returning to DOS.
\r
280 WR_DEMO will also display and capture a PCX-format image if your
\r
281 display adapter supports its appropriate video mode. For example,
\r
282 to capture a PCX-format image file "MY_PICT.PCX" that was created
\r
283 for display on 320 x 200 256-color VGA displays, enter:
\r
285 WR_DEMO my_pict.pcx 19
\r
287 WR_DEMO captures the entire screen and all color planes, so the
\r
288 size of the resultant PCX_DEMO.PCX file may be different than the
\r
332 5. Using The Library
\r
334 The public functions in PCX_LIB (i.e. - those meant to be called by
\r
335 application programs) are:
\r
337 pcx_read - display a PCX-format image file
\r
338 pcx_write - capture a displayed image to a PCX-format file
\r
340 pcx_isvga - determine whether a display adapter supports
\r
343 pcx_init_dsa - set up BIOS to capture EGA color palette
\r
345 pcx_free_dsa - reset BIOS to state before call to
\r
348 All functions are fully and exhaustively documented in the source
\r
349 code files. Example calls to the public functions may be found in
\r
350 the source code files RD_DEMO.C and WR_DEMO.C.
\r