You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assignment to the variable p, which is the previous value in the chain, does not take into account the size of each sample. As we are on a u8 buffer, the previous value should be offset by sample byte count * sample size yet we only jump by sample size.
- let p = u16::from_ne_bytes(buf[i - samples..][..2].try_into().unwrap());+ let p = u16::from_ne_bytes(buf[i - 2 * samples..][..2].try_into().unwrap());
Found this while working on #240, and pushed a fix on there.
The text was updated successfully, but these errors were encountered:
The code responsible for rebuilding a predicted row is wrong for images using more that 8 bits per channel:
image-tiff/src/decoder/mod.rs
Lines 259 to 283 in de6d9cf
The assignment to the variable
p
, which is the previous value in the chain, does not take into account the size of each sample. As we are on au8
buffer, the previous value should be offset bysample byte count * sample size
yet we only jump bysample size
.Found this while working on #240, and pushed a fix on there.
The text was updated successfully, but these errors were encountered: