391 |
|
quiterr("error reading Radiance input"); |
392 |
|
if (bradj) |
393 |
|
shiftcolrs(inl, xmax, bradj); |
394 |
+ |
x = xmax; |
395 |
+ |
while (x--) |
396 |
+ |
inl[x][GRN] = normbright(inl[x]); |
397 |
|
colrs_gambs(inl, xmax); |
398 |
|
x = xmax; |
399 |
|
if (nc < 256) |
400 |
|
while (x--) |
401 |
< |
*--dp = ((long)normbright(inl[x])*nc+128)>>8; |
401 |
> |
*--dp = ((long)inl[x][GRN]*nc+nc/2)>>8; |
402 |
|
else |
403 |
|
while (x--) |
404 |
< |
*--dp = normbright(inl[x]); |
404 |
> |
*--dp = inl[x][GRN]; |
405 |
|
} |
406 |
|
for (x = 0; x < nc; x++) |
407 |
|
clrtab[x][RED] = clrtab[x][GRN] = |
408 |
< |
clrtab[x][BLU] = ((long)x*256+nc/2)/nc; |
408 |
> |
clrtab[x][BLU] = ((long)x*256+128)/nc; |
409 |
|
} |
410 |
|
|
411 |
|
|