image-rs / image-tiff

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

Add ColorType::Multiband enum variant to support samples>1 per pixel #224

Closed weiji14 closed 8 months ago

weiji14 commented 8 months ago

Building on the work at #216 to support reading multi-band TIFF images (common in GeoTIFFs).

This PR extends the work done by @tromper in #216 which added the unit test for reading a 5-band GeoTIFF. I've just added the ColorType::Multiband enum variant as suggested at https://github.com/image-rs/image-tiff/pull/216#discussion_r1506951296), and made sure that the decoder functions can handle this multi-band type.

References:

Supersedes #216, closes #214 and resolves #147.