pearcetm / GeoTIFFTileSource

Implementation of a TileSource for OpenSeadragon based on GeoTIFF.js, enabling local and remote TIFF files to be viewed without using an image server
MIT License
25 stars 5 forks source link

Grayscale Tiff rejected #10

Open evansf opened 2 months ago

evansf commented 2 months ago

THANKS! for the TileSource! It solves an issue for me and I appreciate your work!
But.....Attempting to view a grayscale tiled pyramidal tiff file, it was rejected at each tile because the ImageData type returned from class Converters is wrong. This type is determined by the buffer instantiation in the class Converters. This bug exists in multiple data type routines. In addition, the code in several class Converters methods iterate the output buffer incorrectly. These bugs affects multiple methods in class Converters. I have included source for GeoTiffTileSource.js (renamed .txt) that corrects these errors. I have tested it with my grayscale file but I have not tested the other file types for which I have edited in this correction. I leave it to you to make the adjustments for next release. GeoTIFFTileSource.txt

pearcetm commented 1 month ago

Thanks for noticing this @evansf and for the suggested fixes. Those look reasonable to me, so I've gone ahead and created and merged PR #11