14 |
|
|
15 |
|
#include "color.h" |
16 |
|
|
17 |
+ |
#include "resolu.h" |
18 |
+ |
|
19 |
|
extern double atof(), pow(); |
20 |
|
|
21 |
|
int agryscan(), bgryscan(), aclrscan(), bclrscan(); |
89 |
|
printargs(i, argv, stdout); |
90 |
|
fputformat(COLRFMT, stdout); |
91 |
|
putchar('\n'); |
92 |
< |
fputresolu(YMAJOR|YDECR, xmax, ymax, stdout); |
92 |
> |
fprtresolu(xmax, ymax, stdout); |
93 |
|
/* convert file */ |
94 |
|
switch (ptype) { |
95 |
|
case '2': |
110 |
|
} else { |
111 |
|
/* get header info. */ |
112 |
|
if (checkheader(stdin, COLRFMT, NULL) < 0 || |
113 |
< |
fgetresolu(&xmax, &ymax, stdin) != (YMAJOR|YDECR)) |
113 |
> |
fgetresolu(&xmax, &ymax, stdin) < 0) |
114 |
|
quiterr("bad picture format"); |
115 |
|
/* write PPM header */ |
116 |
|
printf("P%c\n%d %d\n%d\n", binflag ? '6' : '3', |