384 |
|
switch (*cp) { |
385 |
|
case '\n': |
386 |
|
case '\r': /* radiance */ |
387 |
< |
sprintf(buf, "%-3g", intens(cval)/exposure); |
387 |
> |
sprintf(buf, "%.3f", intens(cval)/exposure); |
388 |
|
break; |
389 |
|
case 'l': /* luminance */ |
390 |
< |
sprintf(buf, "%-3gn", bright(cval)*683.0/exposure); |
390 |
> |
sprintf(buf, "%.0fn", bright(cval)*683.0/exposure); |
391 |
|
break; |
392 |
|
case 'c': /* color */ |
393 |
|
comp = pow(2.0, (double)scale); |
670 |
|
if (getscan(y) < 0) |
671 |
|
quiterr("cannot seek for picreadline"); |
672 |
|
/* convert scanline */ |
673 |
< |
if (scale != 0) |
673 |
> |
if (scale) |
674 |
|
for (i = 0; i < xmax; i++) |
675 |
< |
if (scanline[i][EXP]+scale >= 0) |
675 |
> |
if (scanline[i][EXP]) |
676 |
|
scanline[i][EXP] += scale; |
677 |
|
normcolrs(scanline, xmax); |
678 |
|
for (i = 0; i < xmax; i++) { |