AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 1997

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

1997.01.22 18:31 "Reading from standard in", by Todd D Newman
1997.01.22 20:04 "Re: Reading from standard in", by Sam Leffler
1997.01.22 21:14 "Re: Reading from standard in", by Helge Blischke
1997.01.23 00:25 "Re: Reading from standard in", by Dwight Kelly
1997.01.23 00:04 "Re: Reading from standard in", by Tom Lane
1997.01.23 02:03 "Re: Reading from standard in", by <cristy@eplrx7.es.dupont.com>

1997.01.23 00:04 "Re: Reading from standard in", by Tom Lane

You could do it with something like TIFFFdOpen(fileno(stdin), ...)
but as several others have pointed out, it'll fail if stdin is
attached to anything that doesn't support seeking.  Likewise for writing
to stdout.

So generally speaking, you can't deal with anything but a disk file; the
apparent flexibility of stdin/stdout isn't there, because you can't
pipe TIFF data to or from a different process.

I'd suggest logic along the lines of copying data from stdin to a temp
file until reaching EOF, then doing TIFFOpen on the temp file; or the
obvious inverse for writing.  This will work when piped.  If you wanted
to be really smart you could try to detect whether stdin supports seeking
and avoid the file copy when it does.  (Not sure how you could portably
make the same test for stdout, though.)

			regards, tom lane