144 |
|
if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) |
145 |
|
quiterr("bad picture size"); |
146 |
|
/* set view parameters */ |
147 |
< |
if (gotview) |
147 |
> |
if (gotview) { |
148 |
> |
ourview.hresolu = xmax; |
149 |
> |
ourview.vresolu = ymax; |
150 |
|
if (setview(&ourview) != NULL) |
151 |
|
gotview = 0; |
152 |
< |
|
152 |
> |
} |
153 |
|
if ((scanline = (COLR *)malloc(xmax*sizeof(COLR))) == NULL) |
154 |
|
quiterr("out of memory"); |
155 |
|
|
653 |
|
if (getscan(y) < 0) |
654 |
|
quiterr("cannot seek for picreadline"); |
655 |
|
/* convert scanline */ |
656 |
+ |
if (scale != 0) |
657 |
+ |
for (i = 0; i < xmax; i++) |
658 |
+ |
if (scanline[i][EXP]+scale >= 0) |
659 |
+ |
scanline[i][EXP] += scale; |
660 |
|
normcolrs(scanline, xmax); |
661 |
|
for (i = 0; i < xmax; i++) { |
662 |
|
l3[i].r = scanline[i][RED]; |