Update mod.rs

This commit is contained in:
Kamal Ahmad 2019-08-10 22:43:30 +05:00 committed by GitHub
parent 1a6284b177
commit ca7a2ab168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -305,7 +305,6 @@ impl PngImage {
/// 4: Paeth /// 4: Paeth
/// 5: All (heuristically pick the best filter for each line) /// 5: All (heuristically pick the best filter for each line)
pub fn filter_image(&self, filter: u8) -> Vec<u8> { pub fn filter_image(&self, filter: u8) -> Vec<u8> {
//dbg!(self.data.len());
let mut filtered = Vec::with_capacity(self.data.len()); let mut filtered = Vec::with_capacity(self.data.len());
let bpp = ((self.ihdr.bit_depth.as_u8() * self.channels_per_pixel() + 7) / 8) as usize; let bpp = ((self.ihdr.bit_depth.as_u8() * self.channels_per_pixel() + 7) / 8) as usize;
let mut last_line: &[u8] = &[]; let mut last_line: &[u8] = &[];