15 |
|
|
16 |
|
#include "color.h" |
17 |
|
|
18 |
+ |
#include "random.h" |
19 |
+ |
|
20 |
|
#include "targa.h" |
21 |
|
|
22 |
|
#define goodpic(h) (((h)->dataType==IM_RGB || (h)->dataType==IM_CRGB) \ |
95 |
|
/* put header */ |
96 |
|
printargs(argc, argv, stdout); |
97 |
|
putchar('\n'); |
98 |
< |
printf("-Y %d +X %d\n", head.y, head.x); |
98 |
> |
fputresolu(YMAJOR|YDECR, head.x, head.y, stdout); |
99 |
|
/* convert file */ |
100 |
|
tg2ra(&head); |
101 |
|
} else { |
102 |
|
getheader(stdin, NULL); |
103 |
< |
if (scanf("-Y %d +X %d\n", &head.y, &head.x) != 2) |
103 |
> |
if (fgetresolu(&head.x, &head.y, stdin) != (YMAJOR|YDECR)) |
104 |
|
quiterr("bad picture file"); |
105 |
|
/* assign header */ |
106 |
|
head.textSize = 0; |