Write to tiff pages in parallel

  Kiến thức lập trình

Writing to multiple tiff pages is usually suggested as:

  1. write all tiles of the first page
  2. close the directory
  3. write all tiles of the second page
  4. close the directory
  5. etc.
    I am generating high resolution data for one image and I need to write the tiles as I generate them because the total image is too large. I also want to generate the pyramid pages at the same time. My plan is to:
  6. write a row of tiles to the first page
  7. write a second row of tiles to the first page
  8. create a row of reduced resolution tiles
  9. write these tiles to the second page
  10. write a third row of tiles to the first page
  11. write a forth row of tiles to the first page
  12. create a row of reduced resolution tiles
  13. write a row of reduced tiles to the second page
  14. create a row of reduced resolution tiles from the two rows from the second page
  15. write a row of reduced tiles to the third page.
  16. etc.
    This algorithm extends deeper but only buffers two rows from each page. It requires keeping the directories open.
    Can I do this with libtiff?

I can write pyramidal tiled images but only with the first method. I don’t yet see a way to set the page destination before each write of a tile.

New contributor

Frank Evans is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT