112 |
|
printargs(gargc-1, gargv, fout); /* add our command */ |
113 |
|
fprintf(fout, "SOFTWARE= %s\n", VersionID); |
114 |
|
fputnow(fout); |
115 |
+ |
fputs("NCOMP=3\n", fout); /* always RGB */ |
116 |
|
if (info != NULL) /* add extra info if given */ |
117 |
|
fputs(info, fout); |
118 |
|
fputformat(formstr(outfmt), fout); |
133 |
|
STREAMOUT * |
134 |
|
getostream(const char *ospec, const char *mname, int bn, int noopen) |
135 |
|
{ |
135 |
– |
/* static const DCOLOR nocontrib = BLKCOLOR; */ |
136 |
|
static STREAMOUT stdos; |
137 |
+ |
char info[1024]; |
138 |
|
int ofl; |
139 |
|
char oname[1024]; |
140 |
|
LUENT *lep; |
144 |
|
if (!noopen & !using_stdout) { |
145 |
|
if (outfmt != 'a') |
146 |
|
SET_FILE_BINARY(stdout); |
147 |
< |
if (header) |
148 |
< |
printheader(stdout, NULL); |
147 |
> |
if (header) { |
148 |
> |
sprintf(info, "NCOLS=%d\n", stdos.reclen); |
149 |
> |
printheader(stdout, info); |
150 |
> |
} |
151 |
|
printresolu(stdout, xres, yres); |
152 |
|
if (waitflush > 0) |
153 |
|
fflush(stdout); |
198 |
|
flockfile(sop->ofp); /* avoid lock/unlock overhead */ |
199 |
|
#endif |
200 |
|
if (header) { |
198 |
– |
char info[512]; |
201 |
|
char *cp = info; |
202 |
|
if (ofl & OF_MODIFIER || sop->reclen == 1) { |
203 |
|
sprintf(cp, "MODIFIER=%s\n", mname); |
207 |
|
sprintf(cp, "BIN=%d\n", bn); |
208 |
|
while (*cp) ++cp; |
209 |
|
} |
210 |
< |
*cp = '\0'; |
210 |
> |
sprintf(cp, "NCOLS=%d\n", sop->reclen); |
211 |
|
printheader(sop->ofp, info); |
212 |
|
} |
213 |
|
if (accumulate > 0) { /* global resolution */ |