Mail Archives: cygwin/1998/10/30/19:47:26
"Stephen E. Schweibinz" <plan AT mit DOT edu> writes:
>
>
> However the output TIFF file cannot be opened properly in a viewer.
> I have a feeling I need to add the following
>
> setmode(fileno(stdout), O_BINARY);
>
> where the output of the TIFF is occuring, but I am not sure where
> I should stick this line or if this is even the problem.
Do yourself a favor and simply add a '--output ofile' or '-o ofile'
option and just use that instead of writing to standard output.
Make life a little easier (that patch I had sent had an example of
that -- see ppm_openw).
If you want to use file redirection or piping and get the right output,
you'll need to do what you suggest above. Just stick the setmode before
any write to stdout.
fflush (stdout);
setmode (fileno (stdout), O_BINARY);
or, you can use binary mounts.
Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -