2023.04.13 13:16 "Re: [Tiff] TIffWriteDirectory() causes problems", by David C. Partridge
So, I just need to add those tags with a number of entries equal to the number to strips to be written, which I think I can work out like this:
// Work out how many scanlines fit into the default strip
unsigned int rowsPerStrip =3D STRIP_SIZE_DEFAULT / scanLineSize;
// From that we derive the number of strips
int numStrips =3D h / rowsPerStrip;
// If it wasn't an exact division (IOW there's a remainder), add one
// for the final (short) strip.
if (0 !=3D h % rowsPerStrip)
is that still valid if compression is enabled?
If I do that, I assume the internal code would update those tags, and I would then need to call WriteDirectory immediately prior to Close? Or would the automatic RewriteDirectory do it in place in the size hadn't changed?
Editor's note: This mail was not originally archived, and has been reconstructed from quotes.