[−][src]Trait ndarray_vision::format::Decoder
Trait for an image decoder, use this to get an image from a byte stream
Required methods
fn decode(&self, bytes: &[u8]) -> Result<Image<T, C>>
From the bytes decode an image, will perform any scaling or conversions required to represent elements with type T.
Provided methods
fn decode_file<P: AsRef<Path>>(&self, filename: P) -> Result<Image<T, C>>
Given a filename decode an image performing any necessary conversions.
Implementors
impl<T> Decoder<T, RGB> for PpmDecoder where
T: Copy + Clone + Num + NumAssignOps + NumCast + PartialOrd + Display + PixelBound + FromPrimitive,
[src]
T: Copy + Clone + Num + NumAssignOps + NumCast + PartialOrd + Display + PixelBound + FromPrimitive,
Implements the decoder trait for the PpmDecoder.
The ColourModel type argument is locked to RGB - this prevents calling
RGB::into::