diff --git a/src/decoder/stream.rs b/src/decoder/stream.rs index 96a2837..6de9a37 100644 --- a/src/decoder/stream.rs +++ b/src/decoder/stream.rs @@ -277,7 +277,7 @@ impl Read for PackBitsReader { #[cfg(feature = "fax")] pub struct Group4Reader { - decoder: fax::decoder::Group4Decoder>>, + decoder: fax::decoder::Group4Decoder>>>, line_buf: io::Cursor>, height: u16, width: u16, @@ -296,12 +296,12 @@ impl Group4Reader { Ok(Self { decoder: fax::decoder::Group4Decoder::new( - reader.take(compressed_length).bytes(), + io::BufReader::new(reader.take(compressed_length)).bytes(), width, )?, line_buf: io::Cursor::new(Vec::with_capacity(width.into())), - width: width, - height: height, + width, + height, y: 0, }) }