#include #include #include #include #include #ifndef NODEV typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; #endif #ifndef byte typedef unsigned char byte; #endif typedef struct { byte *pic; /* image data */ int w, h; /* size */ int type; /* PIC8 or PIC24 */ byte r[256],g[256],b[256]; /* colormap, if PIC8 */ int frmType; /* def. Format type to save in */ int colType; /* def. Color type to save in */ char fullInfo[128]; /* Format: field in info box */ char shrtInfo[128]; /* short format info */ char *comment; /* comment text */ int numpages; /* # of page files, if >1 */ char pagebname[64]; /* basename of page files */ } PICINFO; int LoadSunRas(FILE *, PICINFO *); int WriteSunRas(FILE *, byte *, int, int, int, byte *, byte *, byte*, int, int, int);