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"; |
83 |
|
rgbout = 1; |
84 |
|
break; |
85 |
|
case 'p': /* RGB primaries */ |
86 |
< |
if (i+9 >= argc) |
86 |
> |
if (i+8 >= argc) |
87 |
|
goto userr; |
88 |
|
outprims[RED][CIEX] = atof(argv[++i]); |
89 |
|
outprims[RED][CIEY] = atof(argv[++i]); |
201 |
|
for (y = 0; y < ymax; y++) { |
202 |
|
if (freadscan(scanin, xmax, stdin) < 0) |
203 |
|
quiterr("error reading input picture"); |
204 |
< |
for (x = 0; x < xmax; x++) |
204 |
> |
for (x = 0; x < xmax; x++) { |
205 |
|
colortrans(scanin[x], xfm, scanin[x]); |
206 |
+ |
if (rgbout) |
207 |
+ |
clipgamut(scanin[x], bright(scanin[x]), |
208 |
+ |
CGAMUT_LOWER, cblack, cwhite); |
209 |
+ |
} |
210 |
|
if (scanout != NULL) { |
211 |
|
for (x = 0; x < xmax; x++) |
212 |
|
setcolr(scanout[x], colval(scanin[x],RED), |