image-rs / image-tiff

TIFF decoding and encoding library in pure Rust
MIT License
121 stars 79 forks source link

Fix 1bpp image decoding and add a test image #252

Closed fintelia closed 4 weeks ago

fintelia commented 4 weeks ago

Fixes the result buffer size computation and also removes a spurious println that slipped in

I created the test image manually in Krita. Feel free to use under CC0. Conversion to TIFF was done using:

gdal_translate -ot Byte -co TILED=YES -co BLOCKXSIZE=16 -co BLOCKYSIZE=16 -co NBITS=1 input.png output.tif