
Thread
2004.10.18 13:31 "Re: [Tiff] Fwd: How can I manually set the StripOffsets and StripCounts fields?", by Frank Warmerdam
#. 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