2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
15 * Routines to read/write pcx images.
23 #define PCX_ERROR_NONE 0
24 #define PCX_ERROR_OPENING 1
25 #define PCX_ERROR_NO_HEADER 2
26 #define PCX_ERROR_WRONG_VERSION 3
27 #define PCX_ERROR_READING 4
28 #define PCX_ERROR_NO_PALETTE 5
29 #define PCX_ERROR_WRITING 6
30 #define PCX_ERROR_MEMORY 7
32 // Reads filename into bitmap bmp, and fills in palette. If bmp->bm_data==NULL,
33 // then bmp->bm_data is allocated and the w,h are filled.
34 // If palette==NULL the palette isn't read in. Returns error code.
36 extern int pcx_get_dimensions( char *filename, int *width, int *height);
38 extern int pcx_read_bitmap( char * filename, grs_bitmap * bmp, int bitmap_type, ubyte * palette );
40 // Writes the bitmap bmp to filename, using palette. Returns error code.
42 extern int pcx_write_bitmap( char * filename, grs_bitmap * bmp, ubyte * palette );
44 extern const char *pcx_errormsg(int error_number);
47 extern int pcx_read_bitmap_palette( char *filename, ubyte *palette);
50 int pcx_read_fullscr(char * filename, ubyte * palette);