2023.04.12 15:14 "[Tiff] TIffWriteDirectory() causes problems", by David C. Partridge

2023.04.13 13:16 "Re: [Tiff] TIffWriteDirectory() causes problems", by Olivier Paquet

I'm not sure where your values come from so I can't say if your rowsPerStrip is ok but the rest looks right. I would rather read TIFFTAG_ROWSPERSTRIP directly than try to compute it, unless you're setting it yourself of course. Compression will not change the number of strips, only their size.

I don't know if you'll still need TIFFWriteDirectory() as I've never done exactly that. It should be obvious when trying it.