--- ray/src/px/ra_xyze.c 1995/10/15 14:07:12 2.1 +++ ray/src/px/ra_xyze.c 1997/01/31 12:51:22 2.3 @@ -1,4 +1,4 @@ -/* Copyright (c) 1995 Regents of the University of California */ +/* Copyright (c) 1997 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -83,7 +83,7 @@ char *argv[]; rgbout = 1; break; case 'p': /* RGB primaries */ - if (i+9 >= argc) + if (i+8 >= argc) goto userr; outprims[RED][CIEX] = atof(argv[++i]); outprims[RED][CIEY] = atof(argv[++i]); @@ -201,8 +201,12 @@ convert() /* convert to XYZE or RGBE picture */ for (y = 0; y < ymax; y++) { if (freadscan(scanin, xmax, stdin) < 0) quiterr("error reading input picture"); - for (x = 0; x < xmax; x++) + for (x = 0; x < xmax; x++) { colortrans(scanin[x], xfm, scanin[x]); + if (rgbout) + clipgamut(scanin[x], bright(scanin[x]), + CGAMUT_LOWER, cblack, cwhite); + } if (scanout != NULL) { for (x = 0; x < xmax; x++) setcolr(scanout[x], colval(scanin[x],RED),