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); |
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; |
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 */ |