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

Comparing ray/src/px/ra_bmp.c (file contents):
Revision 2.19 by greg, Sun Sep 14 15:08:26 2025 UTC vs.
Revision 2.20 by greg, Sun Sep 14 17:11:29 2025 UTC

# Line 382 | Line 382 | rad2bmp(FILE *rfp, BMPWriter *bwr, int inv, RGBPRIMP m
382                          }
383                  else if (bradj)
384                          shiftcolrs(scanin, bwr->hdr->width, bradj);
385 <                if (monpri == NULL && rgbinp != TM_XYZPRIM)
385 >                if ((monpri == NULL) & (rgbinp != TM_XYZPRIM))
386                          for (x = bwr->hdr->width; x--; )
387                                  scanin[x][GRN] = normbright(scanin[x]);
388                  colrs_gambs(scanin, bwr->hdr->width);
# Line 463 | Line 463 | tmap2bmp(char *fnin, char *fnout, char *expec, RGBPRIM
463                  tmflags = TM_F_LINEAR;
464          else
465                  quiterr("illegal exposure specification (auto|human|linear)");
466 <        if (monpri == NULL) {
467 <                tmflags |= TM_F_BW;
468 <                monpri = stdprims;
469 <        }
466 >
467 >        tmflags |= (monpri == NULL)*TM_F_BW;
468                                          /* open Radiance input */
469          if (fnin == NULL)
470                  fp = stdin;
# Line 475 | Line 473 | tmap2bmp(char *fnin, char *fnout, char *expec, RGBPRIM
473                  exit(1);
474          }
475                                          /* tone-map picture */
476 <        if (tmMapPicture(&pa, &xr, &yr, tmflags, monpri, gamval,
476 >        if (tmMapPicture(&pa, &xr, &yr, tmflags,
477 >                        tmflags&TM_F_BW ? stdprims : monpri, gamval,
478                          0., 0., fnin, fp) != TM_E_OK)
479                  exit(1);
480                                          /* try to retrieve info */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines