--- ray/src/px/pic.h 1989/02/02 10:49:00 1.1 +++ ray/src/px/pic.h 2004/03/28 20:33:14 2.4 @@ -1,7 +1,13 @@ +/* RCSid: $Id: pic.h,v 2.4 2004/03/28 20:33:14 schorsch Exp $ */ /* the following three structures are used by ciq */ -/* SCCSid "$SunId$ LBL" */ +#ifndef _RAD_PIC_H_ +#define _RAD_PIC_H_ +#ifdef __cplusplus +extern "C" { +#endif + typedef int colormap[3][256]; typedef unsigned char pixel; @@ -14,3 +20,29 @@ typedef struct { /* image resolution */ extern int xmax,ymax; + + /* defined in closest.c */ +extern void initializeclosest(void); +extern int closest(int r, int g, int b); + + /* defined in cut.c */ +extern int makecm(int nw, int *na); + + /* defined in ciq.c */ +extern void ciq(int dith, int nw, int synth, colormap cm); + + /* defined in biq.c */ +extern void biq(int dith, int nw, int synth, colormap cm); + + /* defined in in the calling program */ +extern void picreadcm(colormap map); +extern void picwritecm(colormap cm); +extern void picwriteline(int y, pixel *l); +extern void picreadline3(int y, rgbpixel *l3); + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_PIC_H_ */ +