58 |
|
#define byte(b) putc(b, stdout) |
59 |
|
#define flush() fflush(stdout) |
60 |
|
|
61 |
< |
#define GAMMA 2.0 /* gamma value used in correction */ |
61 |
> |
#define GAMMA 2.5 /* gamma value used in correction */ |
62 |
|
|
63 |
|
#define MINCOLOR 8 /* start of device color table */ |
64 |
|
|
146 |
|
exposure *= atof(sbuf+9); |
147 |
|
|
148 |
|
/* get picture dimensions */ |
149 |
< |
if (fgets(sbuf, sizeof(sbuf), fin) == NULL || |
150 |
< |
sscanf(sbuf, "-Y %d +X %d\n", &ymax, &xmax) != 2) |
149 |
> |
if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) |
150 |
|
quitmsg("bad picture size"); |
151 |
|
if (xmax > NCOLS || ymax > NROWS) |
152 |
|
quitmsg("resolution mismatch"); |