Add support for IEEEFP Gray/RGB/RGBA/CMYK(64) decoding
This commit is contained in:
1 parent
97c888f166
commit
c2084835fa
5 files changed
+73
-4
No files matched your search
@@ -121,6 +121,27 @@ pub trait EndianReader: Read {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Reads an f64
|
||||
#[inline(always)]
|
||||
fn read_f64(&mut self) -> Result<f64, io::Error> {
|
||||
match self.byte_order() {
|
||||
ByteOrder::LittleEndian => <Self as ReadBytesExt>::read_f64::<LittleEndian>(self),
|
||||
ByteOrder::BigEndian => <Self as ReadBytesExt>::read_f64::<BigEndian>(self),
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn read_f64_into(&mut self, buffer: &mut [f64]) -> Result<(), io::Error> {
|
||||
match self.byte_order() {
|
||||
ByteOrder::LittleEndian => {
|
||||
<Self as ReadBytesExt>::read_f64_into::<LittleEndian>(self, buffer)
|
||||
}
|
||||
ByteOrder::BigEndian => {
|
||||
<Self as ReadBytesExt>::read_f64_into::<BigEndian>(self, buffer)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Reader that decompresses DEFLATE streams
|
||||
|
||||
Reference in new issue
Block a user