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.
This resolves issue #347. The _bulkReadable function detects when a single read should match an IFD buffer byte-for-byte. Instead of extracting every single pixel individually, this PR copies the IFD buffer to a single typed array whenever possible.
For our test case loading unsigned 16-bit 1024x1024 tiles, I observe this optimization is 4x faster thanv2.0.7.
I have written the code to optimize only when possible:
Requesting a single non-interlaced tile without color planes
Ensuring the byte order of the device matches the image byte order
Testing
I have not yet tested with multiple formats / byte counts.
This resolves issue #347. The
_bulkReadable
function detects when a single read should match an IFD buffer byte-for-byte. Instead of extracting every single pixel individually, this PR copies the IFD buffer to a single typed array whenever possible.For our test case loading unsigned 16-bit 1024x1024 tiles, I observe this optimization is 4x faster than
v2.0.7
.I have written the code to optimize only when possible:
Testing