--- ray/src/px/aedimage.c 1989/03/10 10:20:07 1.2 +++ ray/src/px/aedimage.c 1989/09/12 13:04:16 1.3 @@ -146,8 +146,7 @@ char *argv[]; exposure *= atof(sbuf+9); /* get picture dimensions */ - if (fgets(sbuf, sizeof(sbuf), fin) == NULL || - sscanf(sbuf, "-Y %d +X %d\n", &ymax, &xmax) != 2) + if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) quitmsg("bad picture size"); if (xmax > NCOLS || ymax > NROWS) quitmsg("resolution mismatch");