--- ray/src/px/ximage.c 1989/07/24 10:45:12 1.8 +++ ray/src/px/ximage.c 1989/10/03 09:11:43 1.11 @@ -38,7 +38,7 @@ static char SCCSid[] = "$SunId$ LBL"; #define BORWIDTH 5 /* border width */ #define BARHEIGHT 25 /* menu bar size */ -double gamcor = 2.0; /* gamma correction */ +double gamcor = 2.2; /* gamma correction */ XRASTER *ourras = NULL; /* our stored raster image */ @@ -141,15 +141,13 @@ char *argv[]; /* get header */ getheader(fin, headline); /* get picture dimensions */ - if (fscanf(fin, "-Y %d +X %d\n", &ymax, &xmax) != 2) + if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) quiterr("bad picture size"); /* set view parameters */ - if (gotview) { - ourview.hresolu = xmax; - ourview.vresolu = ymax; + if (gotview) if (setview(&ourview) != NULL) gotview = 0; - } + if ((scanline = (COLR *)malloc(xmax*sizeof(COLR))) == NULL) quiterr("out of memory");