ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pic.h
Revision: 2.4
Committed: Sun Mar 28 20:33:14 2004 UTC (20 years, 1 month ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3, HEAD
Changes since 2.3: +21 -1 lines
Log Message:
Continued ANSIfication, and other fixes and clarifications.

File Contents

# User Rev Content
1 schorsch 2.4 /* RCSid: $Id: pic.h,v 2.3 2003/07/14 22:24:00 schorsch Exp $ */
2 greg 1.2 /* the following three structures are used by ciq */
3 greg 1.1
4 schorsch 2.3 #ifndef _RAD_PIC_H_
5     #define _RAD_PIC_H_
6    
7     #ifdef __cplusplus
8     extern "C" {
9     #endif
10    
11 greg 1.1 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 schorsch 2.3
24 schorsch 2.4 /* 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 schorsch 2.3 #ifdef __cplusplus
45     }
46     #endif
47     #endif /* _RAD_PIC_H_ */
48