13 |
|
|
14 |
|
#include <stdio.h> |
15 |
|
|
16 |
< |
#include <rasterfile.h> |
16 |
> |
#include "rasterfile.h" |
17 |
|
|
18 |
|
#include "color.h" |
19 |
|
|
115 |
|
/* put header */ |
116 |
|
printargs(argc, argv, stdout); |
117 |
|
putchar('\n'); |
118 |
< |
printf("-Y %d +X %d\n", ymax, xmax); |
118 |
> |
fputresolu(YMAJOR|YDECR, xmax, ymax, stdout); |
119 |
|
/* convert file */ |
120 |
|
pr2ra(&head); |
121 |
|
} else { |
187 |
|
return(NULL); |
188 |
|
/* discard header */ |
189 |
|
getheader(p->fp, NULL); |
190 |
< |
if (fscanf(p->fp, "-Y %d +X %d\n", &ymax, &xmax) != 2) |
190 |
> |
if (fgetresolu(&xmax, &ymax, p->fp) != (YMAJOR|YDECR)) |
191 |
|
quiterr("bad picture size"); |
192 |
|
p->nexty = 0; |
193 |
|
p->bytes_line = 0; /* variable length lines */ |