geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.
However, I ran into the issue that BaseDecoder isn't exported. I don't know if the TIFF files would include a predictor (probably not). If they had a predictor, BaseDecoder.decode() would handle that. As applyPredictor isn't exported, either, the only alternative would be to maintain a local copy of predictor.js.
I started looking into support for OME-TIFF files with JPEG 2000 compression. While I haven't tried it, this module may be suitable: https://github.com/cornerstonejs/codecs/tree/main/packages/openjpeg
However, I ran into the issue that
BaseDecoder
isn't exported. I don't know if the TIFF files would include a predictor (probably not). If they had a predictor,BaseDecoder.decode()
would handle that. AsapplyPredictor
isn't exported, either, the only alternative would be to maintain a local copy ofpredictor.js
.