image-rs / image-tiff

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

Allow for intra-byte bits_per_sample. #218

Open samsieber opened 1 year ago

samsieber commented 1 year ago

Specifically, correctly read stripped tifs for any bits_per_sample sized up to the normal maximum bits_per_sample limit. Also, correctly read tiled tiffs that have bit padding in the last tile of each row. Bit padding in more than one tile per row is not supported.

Future work could include error reporting about gaps in coverage, tests, and a separate newtype for buffer indexing (vs usize for bytes)

Addresses #217; here are the caveats/support: