| 38 |
|
static void getmbcalfile(char *fn, struct mbc *mb); |
| 39 |
|
|
| 40 |
|
|
| 41 |
< |
extern double |
| 41 |
> |
double |
| 42 |
|
rgblum( /* compute (scotopic) luminance of RGB color */ |
| 43 |
|
COLOR clr, |
| 44 |
|
int scotopic |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
|
| 56 |
< |
extern double |
| 56 |
> |
double |
| 57 |
|
cielum( /* compute (scotopic) luminance of CIE color */ |
| 58 |
|
COLOR xyz, |
| 59 |
|
int scotopic |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
|
| 70 |
< |
extern COLOR * |
| 70 |
> |
COLOR * |
| 71 |
|
nextscan(void) /* read and condition next scanline */ |
| 72 |
|
{ |
| 73 |
|
if (nread >= numscans(&inpres)) { |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
|
| 105 |
< |
extern COLOR * |
| 105 |
> |
COLOR * |
| 106 |
|
firstscan(void) /* return first processed scanline */ |
| 107 |
|
{ |
| 108 |
|
if (mbcalfile != NULL) /* load macbethcal file */ |
| 127 |
|
|
| 128 |
|
static void |
| 129 |
|
sfscan( /* apply scalefactor to scanline */ |
| 130 |
< |
register COLOR *sl, |
| 130 |
> |
COLOR *sl, |
| 131 |
|
int len, |
| 132 |
|
double sf |
| 133 |
|
) |
| 159 |
|
|
| 160 |
|
static void |
| 161 |
|
matscan( /* apply color matrix to scaline */ |
| 162 |
< |
register COLOR *sl, |
| 162 |
> |
COLOR *sl, |
| 163 |
|
int len, |
| 164 |
|
COLORMAT mat |
| 165 |
|
) |
| 176 |
|
mbscan( /* apply macbethcal adj. to scaline */ |
| 177 |
|
COLOR *sl, |
| 178 |
|
int len, |
| 179 |
< |
register struct mbc *mb |
| 179 |
> |
struct mbc *mb |
| 180 |
|
) |
| 181 |
|
{ |
| 182 |
|
double d; |
| 183 |
< |
register int i, j; |
| 183 |
> |
int i, j; |
| 184 |
|
|
| 185 |
|
while (len--) { |
| 186 |
|
colortrans(sl[0], mb->cmat, sl[0]); |
| 225 |
|
static void |
| 226 |
|
getmbcalfile( /* load macbethcal file */ |
| 227 |
|
char *fn, |
| 228 |
< |
register struct mbc *mb |
| 228 |
> |
struct mbc *mb |
| 229 |
|
) |
| 230 |
|
{ |
| 231 |
|
char buf[128]; |
| 232 |
|
FILE *fp; |
| 233 |
|
int inpflags = 0; |
| 234 |
< |
register int i; |
| 234 |
> |
int i; |
| 235 |
|
|
| 236 |
|
if ((fp = fopen(fn, "r")) == NULL) |
| 237 |
|
syserror(fn); |