1 |
< |
/* Copyright (c) 1995 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1997 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
326 |
|
fgetval(stdin, 'f', &xyYin[0]) != 1 || |
327 |
|
fgetval(stdin, 'f', &xyYin[1]) != 1 || |
328 |
|
fgetval(stdin, 'f', &xyYin[2]) != 1 || |
329 |
< |
xyYin[0] < 0. | xyYin[0] > 1. | |
330 |
< |
xyYin[1] < 0. | xyYin[1] > 1.) { |
329 |
> |
xyYin[0] < 0. | xyYin[1] < 0. || |
330 |
> |
xyYin[0] + xyYin[1] > 1.) { |
331 |
|
fprintf(stderr, "%s: bad color input data\n", |
332 |
|
progname); |
333 |
|
exit(1); |
583 |
|
ctmp[1] = xyYin[2]; |
584 |
|
ctmp[2] = (1. - xyYin[0] - xyYin[1]) * d; |
585 |
|
cie_rgb(rgbout, ctmp); |
586 |
+ |
/* allow negative values */ |
587 |
+ |
colortrans(rgbout, xyz2rgbmat, ctmp, 0); |
588 |
|
} |
589 |
|
|
590 |
|
|