| 1 |
/* RCSid: $Id: pic.h,v 2.3 2003/07/14 22:24:00 schorsch Exp $ */ |
| 2 |
/* the following three structures are used by ciq */ |
| 3 |
|
| 4 |
#ifndef _RAD_PIC_H_ |
| 5 |
#define _RAD_PIC_H_ |
| 6 |
|
| 7 |
#ifdef __cplusplus |
| 8 |
extern "C" { |
| 9 |
#endif |
| 10 |
|
| 11 |
typedef int colormap[3][256]; |
| 12 |
|
| 13 |
typedef unsigned char pixel; |
| 14 |
|
| 15 |
typedef struct { |
| 16 |
pixel r,g,b; |
| 17 |
} rgbpixel; |
| 18 |
|
| 19 |
#define rgb_bright(p) (int)((77L*(p)->r+151L*(p)->g+28L*(p)->b)/256) |
| 20 |
|
| 21 |
/* image resolution */ |
| 22 |
extern int xmax,ymax; |
| 23 |
|
| 24 |
/* defined in closest.c */ |
| 25 |
extern void initializeclosest(void); |
| 26 |
extern int closest(int r, int g, int b); |
| 27 |
|
| 28 |
/* defined in cut.c */ |
| 29 |
extern int makecm(int nw, int *na); |
| 30 |
|
| 31 |
/* defined in ciq.c */ |
| 32 |
extern void ciq(int dith, int nw, int synth, colormap cm); |
| 33 |
|
| 34 |
/* defined in biq.c */ |
| 35 |
extern void biq(int dith, int nw, int synth, colormap cm); |
| 36 |
|
| 37 |
/* defined in in the calling program */ |
| 38 |
extern void picreadcm(colormap map); |
| 39 |
extern void picwritecm(colormap cm); |
| 40 |
extern void picwriteline(int y, pixel *l); |
| 41 |
extern void picreadline3(int y, rgbpixel *l3); |
| 42 |
|
| 43 |
|
| 44 |
#ifdef __cplusplus |
| 45 |
} |
| 46 |
#endif |
| 47 |
#endif /* _RAD_PIC_H_ */ |
| 48 |
|