How do I to display Large Tiff Images in React?

58 views Asked by At

I want to display large multi-page/document TIFF files in a web app. The images can have multiple resolutions (i.e. each page can vary in resolution size) and some are very large (50000+ x 20000+ pixels). Their compression algorithms can vary from LZW to CCITT T.6, but most are CCITT T.6.

I know modern web browsers do not support displaying tiff images natively. Instead, I have been trying to use libraries to display these images. The libraries I have tried include the following:

  • image-js and tiff by Zakodium
    • Problems: Memory and possibly unable to handle CCITT T.6 compression
  • tiff.js
    • Problems: Memory
  • openseadragon with GeoTIFFTileSource
    • Problems: Unable to integrate GeoTiffTileSource plugin due to lack of experience. I have don't know how to integrate the plugin into my project since the release is just the whole repo and I do not understand how to import the project's release into my CRA project.
  • geotiff.js
    • Problems: Does not display images with CCITT T.6 compression.

Since my image is 50000+ x 20000+ pixels at 200 or 400 DPI and some are RGB, I believe I run into most browser's memory limit (2GB in Chrome, Edge, and Firefox I believe). How do image viewers handle this? Is there processing that needs to be done to handle these images? I don't believe most viewers will display all the pixels since most screens are not that high so I must be missing something fundamentally.

0

There are 0 answers