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
859 stars 179 forks source link

[2.0.7] nbits question on 11-bit image #357

Open ashley-mort opened 1 year ago

ashley-mort commented 1 year ago

I have an 11-bit image with 4 bands. The image displays properly (and has in-range values) in tools like QGIS but my 2nd band has lots of screwy values in geotiff.js. Probably 90% of my 2nd band values are massive.

I am looking for general ideas of where to look on this one. Any suggestions as to what could be going on here?

For example here are 2 pixels from my image in geotiff.js after doing an image.readRasters({window: myWindow, interleave: true}): [0] 357 [1] 62721 [2] 501 [3] 374

[4] 356 [5] 64001 [6] 506 [7] 376

constantinius commented 1 year ago

@ashley-mort

There may be issues with n-bit decoding. Do you have a public URL for that image so that I can check?