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
866 stars 182 forks source link

readRGB() does not always return an interleaved array #424

Open sguimmara opened 6 months ago

sguimmara commented 6 months ago

The documentation for readRGB() indicates that

The result is always an interleaved typed array.

However, the parameter interleave makes it possible to return one array per channel.

constantinius commented 6 months ago

@sguimmara thanks for reporting this. Do you have a testcase or code snippet to reproduce?

sguimmara commented 6 months ago

@constantinius Well it's not really a bug, it's just that the documentation should be updated to remove the sentence

The result is always an interleaved typed array.