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
April 2009

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

2009.04.06 15:35 "Writing tiff to in-memory buffer", by Christian Henning
2009.04.06 16:30 "Re: Writing tiff to in-memory buffer", by Bob Friesenhahn
2009.04.06 18:10 "Re: Writing tiff to in-memory buffer", by Christian Henning
2009.04.06 18:45 "Re: Writing tiff to in-memory buffer", by Bob Friesenhahn
2009.04.07 13:44 "Re: Writing tiff to in-memory buffer", by Christian Henning
2009.04.07 14:13 "Re: Writing tiff to in-memory buffer", by Edward Lam
2009.04.07 15:35 "Re: Writing tiff to in-memory buffer", by Bob Friesenhahn
2009.04.07 15:56 "Re: Writing tiff to in-memory buffer", by Christian Henning

2009.04.07 14:13 "Re: Writing tiff to in-memory buffer", by Edward Lam

Christian Henning wrote:
> Fixing that gives me a valid TIFF*. I also need to setup my seek_proc
> to prohibit it from seeking on an empty ostream. Doing though would
> raise the failbit. I don't understand why TIFFClientOpen is calling
> seek_proc( 0,0). It seems redundant to me.

This was noted a while back when tif_stream.cxx was tested (see 
http://www.asmail.be/msg0055045547.html). It was thought to be a bug at 
the time, but then later resolved to be correct. Unfortunately, I can no 
longer find the subsequent discussion that resolved it in libtiff bug 
database. (I forget whether the bug was logged before the libtiff bugdb 
migration.)

Here is the current comment from the trunk source:
/*
  * The doc for "fopen" for some STD_C_LIBs says that if you
  * open a file for modify ("+"), then you must fseek (or
  * fflush?) between any freads and fwrites.  This is not
  * necessary on most systems, but has been shown to be needed
  * on Solaris.
  */
TIFFSeekFile( tif, 0, SEEK_SET );

Regards,
-Edward