116 |
|
fputs("NCOMP=3\n", fout); /* always RGB */ |
117 |
|
if (info != NULL) /* add extra info if given */ |
118 |
|
fputs(info, fout); |
119 |
+ |
if ((outfmt == 'f') | (outfmt == 'd')) |
120 |
+ |
fputendian(fout); |
121 |
|
fputformat(formstr(outfmt), fout); |
122 |
|
fputc('\n', fout); /* empty line ends header */ |
123 |
|
} |
148 |
|
if (!noopen & !using_stdout) { |
149 |
|
if (outfmt != 'a') |
150 |
|
SET_FILE_BINARY(stdout); |
151 |
+ |
#ifdef getc_unlocked |
152 |
+ |
flockfile(stdout); /* avoid lock/unlock overhead */ |
153 |
+ |
#endif |
154 |
|
if (header) { |
155 |
|
cp = info; |
156 |
|
if (yres > 0) { |
167 |
|
if (waitflush > 0) |
168 |
|
fflush(stdout); |
169 |
|
stdos.xr = xres; stdos.yr = yres; |
165 |
– |
#ifdef getc_unlocked |
166 |
– |
flockfile(stdout); /* avoid lock/unlock overhead */ |
167 |
– |
#endif |
170 |
|
using_stdout = 1; |
171 |
|
} |
172 |
|
stdos.ofp = stdout; |