public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mumit Khan <khan@xraylith.wisc.edu>
To: "Stephen E. Schweibinz" <plan@mit.edu>
Cc: gnu-win32@cygnus.com
Subject: Re: TIFF I/O, netpbm
Date: Fri, 30 Oct 1998 05:08:00 -0000	[thread overview]
Message-ID: <9810300436.AA00893@modi.xraylith.wisc.edu> (raw)
In-Reply-To: <199810290228.VAA28025@department-of-alchemy.mit.edu>

"Stephen E. Schweibinz" <plan@mit.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@cygnus.com" with one line of text: "help".

  reply	other threads:[~1998-10-30  5:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-28 23:22 Stephen E. Schweibinz
1998-10-30  5:08 ` Mumit Khan [this message]
1998-10-29  9:39 Stephen E. Schweibinz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9810300436.AA00893@modi.xraylith.wisc.edu \
    --to=khan@xraylith.wisc.edu \
    --cc=gnu-win32@cygnus.com \
    --cc=plan@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).