| 240 |
|
if (geometry != NULL) { |
| 241 |
|
bzero((char *)&oursizhints, sizeof(oursizhints)); |
| 242 |
|
i = XParseGeometry(geometry, &oursizhints.x, &oursizhints.y, |
| 243 |
< |
&oursizhints.width, &oursizhints.height); |
| 243 |
> |
(unsigned *)&oursizhints.width, |
| 244 |
> |
(unsigned *)&oursizhints.height); |
| 245 |
|
if ((i&(WidthValue|HeightValue)) == (WidthValue|HeightValue)) |
| 246 |
|
oursizhints.flags |= USSize; |
| 247 |
|
else { |
| 411 |
|
sprintf(buf, "%.3f", intens(cval)/exposure); |
| 412 |
|
break; |
| 413 |
|
case 'l': /* luminance */ |
| 414 |
< |
sprintf(buf, "%.0fn", bright(cval)*683.0/exposure); |
| 414 |
> |
sprintf(buf, "%.0fn", luminance(cval)/exposure); |
| 415 |
|
break; |
| 416 |
|
case 'c': /* color */ |
| 417 |
|
comp = pow(2.0, (double)scale); |
| 735 |
|
register int i, val; |
| 736 |
|
|
| 737 |
|
for (i = 0; i < 256; i++) { |
| 738 |
< |
val = pow(i/256.0, 1.0/gamcor) * 256.0; |
| 738 |
> |
val = pow((i+0.5)/256.0, 1.0/gamcor) * 256.0; |
| 739 |
|
map[0][i] = map[1][i] = map[2][i] = val; |
| 740 |
|
} |
| 741 |
|
} |