2020.02.05 04:07 "[Tiff] Inhaling an image all at once in scanline format", by David C. Partridge

2020.02.05 04:07 "[Tiff] Inhaling an image all at once in scanline format", by David C. Partridge

Currently my code uses TIFFReadScanline() to read the image data from the file. It just iterates through processing the data scanline by scanline. Yes, I realise that won't handle tiled images, but I've yet to encounter one of those...

So as to be able to exploit OpenMP threading to decode the data once it's been read I'd like to inhale the entire file in as few calls as possible (ideally one call) into a memory area calculated as scanline size times number of rows (the images I process are small enough that this wouldn't be a problem).

Is there a way to do this such that the data returned is the same as if I had called TIFFReadScanline() multiple times?

If that's not readily achievable, if I use TIFFReadRawStrip does that return the same data as if TIFFReadScanLine had been called the appropriate number of times?

Thanks

David