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
860 stars 181 forks source link

fix indexing for reading rational or srational arrays #438

Open sam6321 opened 1 week ago

sam6321 commented 1 week ago

Fix for #437

constantinius commented 1 week ago

Hi @sam6321

Thanks for providing the fix. It would be great if you could also add a testcase for that to demonstrate it works.

sam6321 commented 1 week ago

Sure I can look at doing that

sam6321 commented 1 week ago

@constantinius I tried to add the most minimal test case I could. I'm not sure how to add test files to the repository so I just put the file data inline in the code (it's not really that big so I hope that's okay).

I can instead provide the tiff file directly if that's more preferable