--- ray/src/px/ximage.c 1989/10/20 20:36:10 1.12 +++ ray/src/px/ximage.c 1989/11/06 15:12:03 1.14 @@ -144,10 +144,12 @@ char *argv[]; if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) quiterr("bad picture size"); /* set view parameters */ - if (gotview) + if (gotview) { + ourview.hresolu = xmax; + ourview.vresolu = ymax; if (setview(&ourview) != NULL) gotview = 0; - + } if ((scanline = (COLR *)malloc(xmax*sizeof(COLR))) == NULL) quiterr("out of memory"); @@ -651,6 +653,10 @@ register rgbpixel *l3; if (getscan(y) < 0) quiterr("cannot seek for picreadline"); /* convert scanline */ + if (scale != 0) + for (i = 0; i < xmax; i++) + if (scanline[i][EXP]+scale >= 0) + scanline[i][EXP] += scale; normcolrs(scanline, xmax); for (i = 0; i < xmax; i++) { l3[i].r = scanline[i][RED];