
Thread
2004.10.18 14:16 "Re: [Tiff] Fwd: How can I manually set the StripOffsets and StripCounts fields?", by Sachin Garg
#. 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?
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");
Thanks Frank, this does solved my problem.
Also, I noticed the code I copy-pasted from tiffcp doesnt copies compression algorithm related tags. I will see what I need to do to copy them. Anyway, any suggestions on this are ofcourse welcome :-)
Sachin Garg [India]
http://www.geocities.com/schngrg
http://sachingarg.go.to