geotiffjs / geotiff.js

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.
https://geotiffjs.github.io/
MIT License
878 stars 183 forks source link

Export BaseDecoder or JPEG 2000 support #283

Closed andreasg123 closed 2 years ago

andreasg123 commented 2 years ago

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. As applyPredictor isn't exported, either, the only alternative would be to maintain a local copy of predictor.js.

constantinius commented 2 years ago

This is solved with #288