diff --git a/src/common/color.h b/src/common/color.h index 191e2962..c9962bbd 100644 --- a/src/common/color.h +++ b/src/common/color.h @@ -1,4 +1,4 @@ -/* RCSid $Id: color.h,v 2.34 2015/03/26 15:40:32 greg Exp $ */ +/* RCSid $Id: color.h,v 2.35 2021/11/14 17:30:02 greg Exp $ */ /* * color.h - header for routines using pixel color values. * @@ -55,14 +55,23 @@ typedef float COLORMAT[3][3]; /* color coordinate conversion matrix */ #define multcolor(c1,c2) ((c1)[0]*=(c2)[0],(c1)[1]*=(c2)[1],(c1)[2]*=(c2)[2]) -#ifdef NTSC +#if defined(NTSC_RGB) #define CIE_x_r 0.670 /* standard NTSC primaries */ #define CIE_y_r 0.330 #define CIE_x_g 0.210 #define CIE_y_g 0.710 #define CIE_x_b 0.140 #define CIE_y_b 0.080 -#define CIE_x_w (1./3.) /* use true white */ +#define CIE_x_w (1./3.) /* use EE white */ +#define CIE_y_w (1./3.) +#elif defined(SHARP_RGB) +#define CIE_x_r 0.6898 /* "sharp" RGB primaries */ +#define CIE_y_r 0.3206 +#define CIE_x_g 0.0736 +#define CIE_y_g 0.9003 +#define CIE_x_b 0.1166 +#define CIE_y_b 0.0374 +#define CIE_x_w (1./3.) /* use EE white */ #define CIE_y_w (1./3.) #else #define CIE_x_r 0.640 /* nominal CRT primaries */ @@ -71,7 +80,7 @@ typedef float COLORMAT[3][3]; /* color coordinate conversion matrix */ #define CIE_y_g 0.600 #define CIE_x_b 0.150 #define CIE_y_b 0.060 -#define CIE_x_w (1./3.) /* use true white */ +#define CIE_x_w (1./3.) /* use EE white */ #define CIE_y_w (1./3.) #endif @@ -98,7 +107,7 @@ typedef float COLORMAT[3][3]; /* color coordinate conversion matrix */ #define CIE_gf (CIE_y_g*CIE_C_gD/CIE_D) #define CIE_bf (CIE_y_b*CIE_C_bD/CIE_D) -/* As of 9-94, CIE_rf=.265074126, CIE_gf=.670114631 and CIE_bf=.064811243 */ +/* Default CIE_rf=.265074126, CIE_gf=.670114631 and CIE_bf=.064811243 */ /***** The following definitions are valid for RGB colors only... *****/ diff --git a/src/rt/rpict.c b/src/rt/rpict.c index 9d5b5da0..fe5c927a 100644 --- a/src/rt/rpict.c +++ b/src/rt/rpict.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rpict.c,v 2.94 2020/07/20 15:52:30 greg Exp $"; +static const char RCSid[] = "$Id: rpict.c,v 2.95 2021/11/14 17:30:02 greg Exp $"; #endif /* * rpict.c - routines and variables for picture generation. @@ -340,6 +340,7 @@ rpict( /* generate image(s) */ if ((pa < .99) | (pa > 1.01)) fputaspect(pa, stdout); fputnow(stdout); + fputprims(stdprims, stdout); fputformat(COLRFMT, stdout); putchar('\n'); if (zout != NULL) diff --git a/src/rt/rv2.c b/src/rt/rv2.c index b265fe42..9807e62c 100644 --- a/src/rt/rv2.c +++ b/src/rt/rv2.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rv2.c,v 2.72 2021/02/12 00:41:19 greg Exp $"; +static const char RCSid[] = "$Id: rv2.c,v 2.73 2021/11/14 17:30:02 greg Exp $"; #endif /* * rv2.c - command routines used in tracing a view. @@ -870,6 +870,7 @@ writepict( /* write the picture to a file */ fputexpos(exposure, fp); if (dev->pixaspect != 1.0) fputaspect(dev->pixaspect, fp); + fputprims(stdprims, fp); fputformat(COLRFMT, fp); putc('\n', fp); fprtresolu(hresolu, vresolu, fp);