ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/ra_ps.c
(Generate patch)

Comparing ray/src/px/ra_ps.c (file contents):
Revision 2.32 by greg, Mon Jul 27 01:25:33 2020 UTC vs.
Revision 2.33 by greg, Fri Oct 4 01:53:45 2024 UTC

# Line 81 | Line 81 | headline(              /* check header line */
81   {
82          char  fmt[MAXFMTLEN];
83  
84 <        if (isformat(s)) {
85 <                formatval(fmt, s);
86 <                wrongformat = strcmp(fmt, COLRFMT);
87 <        } else if (isaspect(s))
84 >        if (formatval(fmt, s))
85 >                wrongformat = strcmp(fmt, COLRFMT) && strcmp(fmt, SPECFMT);
86 >        else if (isaspect(s))
87                  pixaspect *= aspectval(s);
88 +        else if (isncomp(s))
89 +                NCSAMP = ncompval(s);
90 +        else if (iswlsplit(s))
91 +                wlsplitval(WLPART, s);
92          return(0);
93   }
94  
# Line 95 | Line 98 | main(int  argc, char  *argv[])
98          int  i;
99          double  d;
100          
101 <        progname = fixargv0(argv[0]);
101 >        progname = argv[0];
102  
103          for (i = 1; i < argc; i++)
104                  if (argv[i][0] == '-')
# Line 473 | Line 476 | ra2ps(void)                            /* convert Radiance scanlines to 6-bit
476                  quiterr("out of memory in ra2ps");
477                                                  /* convert image */
478          for (y = ymax-1; y >= 0; y--) {
479 <                if (freadcolrs(scanin, xmax, stdin) < 0)
479 >                if (fread2colrs(scanin, xmax, stdin, NCSAMP, WLPART) < 0)
480                          quiterr("error reading Radiance picture");
481 <                if (putprim == Cputprim || devgam != 1.) {
481 >                if ((putprim == Cputprim) | (devgam != 1.)) {
482                          if (bradj)                      /* adjust exposure */
483                                  shiftcolrs(scanin, xmax, bradj);
484                          colrs_gambs(scanin, xmax);      /* gamma compression */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines