--- ray/src/util/dctimestep.c 2019/03/01 01:00:03 2.40 +++ ray/src/util/dctimestep.c 2019/10/23 17:00:14 2.43 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: dctimestep.c,v 2.40 2019/03/01 01:00:03 greg Exp $"; +static const char RCSid[] = "$Id: dctimestep.c,v 2.43 2019/10/23 17:00:14 greg Exp $"; #endif /* * Compute time-step result using Daylight Coefficient method. @@ -48,7 +48,7 @@ sum_images(const char *fspec, const CMATRIX *cv, FILE error(SYSTEM, errmsg); } dt = DTfromHeader; - if ((err = cm_getheader(&dt, NULL, NULL, fp)) != NULL) + if ((err = cm_getheader(&dt, NULL, NULL, NULL, fp)) != NULL) error(USER, err); if ((dt != DTrgbe) & (dt != DTxyze) || !fscnresolu(&xr, &yr, fp)) { @@ -187,6 +187,9 @@ main(int argc, char *argv[]) case 'a': outfmt = DTascii; break; + case 'c': + outfmt = DTrgbe; + break; default: goto userr; } @@ -299,6 +302,8 @@ main(int argc, char *argv[]) fprintf(ofp, "FRAME=%d\n", i); fprintf(ofp, "NROWS=%d\n", rvec->nrows); fputs("NCOLS=1\nNCOMP=3\n", ofp); + if ((outfmt == 'f') | (outfmt == 'd')) + fputendian(ofp); fputformat((char *)cm_fmt_id[outfmt], ofp); fputc('\n', ofp); } @@ -325,6 +330,8 @@ main(int argc, char *argv[]) fprintf(ofp, "NROWS=%d\n", rmtx->nrows); fprintf(ofp, "NCOLS=%d\n", rmtx->ncols); fputs("NCOMP=3\n", ofp); + if ((outfmt == 'f') | (outfmt == 'd')) + fputendian(ofp); fputformat((char *)cm_fmt_id[outfmt], ofp); fputc('\n', ofp); }