From 5ae4aa58237bd1a8166b5ad565be6f3f744e01cf Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Mon, 14 Oct 2024 20:29:37 -0500 Subject: [PATCH] Drop hack to fix byte count. The byte count on this 800x600 32-bit image should come to 1,920,000 bytes... But it came to 1,920,032 bytes. I'm not sure where the extra 32 bytes come from, but I have to go fix it before I get to call the decoder complete. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index baf60e7..82bda6c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,7 @@ fn main() -> Result<(), DecodeError> { let mut writer = encoder.write_header().unwrap(); let data: Vec = PixelIterExpander::try_new(decoder).unwrap().collect(); - let result = writer.write_image_data(&data[0..(data.len()-32)]); + let result = writer.write_image_data(&data); if let Err(res) = result { eprintln!("{}", res); }