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
October 2004

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

2004.10.18 13:00 "How can I manually set the StripOffsets and StripCounts fields?", by Sachin Garg
2004.10.18 13:31 "Re: Fwd: How can I manually set the StripOffsets and StripCounts fields?", by Frank Warmerdam
2004.10.18 14:46 "Re: Fwd: How can I manually set the StripOffsets and StripCounts fields?", by Sachin Garg
2004.10.18 13:55 "Fwd: How can I manually set the StripOffsets and StripCounts fields?", by Sachin Garg

2004.10.18 13:31 "Re: Fwd: How can I manually set the StripOffsets and StripCounts fields?", by Frank Warmerdam

Sachin Garg wrote:

> #. A possible solution I can think of is to create dummy Offsets and
> ByteCounts fields (with values 0) in the tiff directory when I am
> writting only the tags. This way the ReadDir routine wont fail when I
> read in the file.
> 
> I couldnt figure-out how to create these dummy tags. I tried
> TIFFGrowStrips but I guess thatz not what I need to do. How can I
> create these dummy tags?

Sachin,

I believe the TIFFWriteCheck() function will ensure that a zeroed
set of image offset/size tags gets written.  I do this routinely in
my software.  The TIFFWriteCheck() function isn't documented in the man
pages, and is mainly intended for internal use.   I call it like this:

     TIFFWriteCheck( hTIFF, TIFFIsTiled(hTIFF), "GTiffDataset::Crystalize");

> (And later when I will be writting the actual image data using other
> tiffcp's routines like writeBufferToContigStrips etc... I hope the
> dummy tags will get overwritten with correct values, or will I have to
> do something else for that?)

Yes, this should work fine.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent