Off by one...
This commit is contained in:
@ -119,7 +119,7 @@ fn image_to_offimage_buffer(image: GrayAlphaImage) -> eyre::Result<Box<[u8; IOCT
|
||||
);
|
||||
|
||||
// Iterate over pixels and copy them into `buf`.
|
||||
for (i, pixel) in (0..buf.len()).rev().zip(image.chunks_exact(2)) {
|
||||
for (i, pixel) in (0..buf.len() - 1).rev().zip(image.chunks_exact(2)) {
|
||||
let &[gray, alpha] = pixel else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user