Support 32-bit grayscale decoding

This commit is contained in:
Andrew Champion committed 2019-12-10 20:18:23 +00:00
1 parent ff574b4ca2
commit fca4e1f88a
4 files changed
+69 -1

No files matched your search

+12
View File
@@ -59,6 +59,18 @@ pub trait EndianReader: Read {
}
}
#[inline(always)]
fn read_u32_into(&mut self, buffer: &mut [u32]) -> Result<(), io::Error> {
match self.byte_order() {
ByteOrder::LittleEndian => {
<Self as ReadBytesExt>::read_u32_into::<LittleEndian>(self, buffer)
}
ByteOrder::BigEndian => {
<Self as ReadBytesExt>::read_u32_into::<BigEndian>(self, buffer)
}
}
}
/// Reads an i32
#[inline(always)]
fn read_i32(&mut self) -> Result<i32, io::Error> {