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`.
|
// 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 {
|
let &[gray, alpha] = pixel else {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user