[−][src]Trait ndarray_vision::format::Encoder
Trait for an image encoder
Required methods
fn encode(&self, image: &Image<T, C>) -> Vec<u8>
Encode an image into a sequence of bytes for the given format
Provided methods
fn encode_file<P: AsRef<Path>>(
&self,
image: &Image<T, C>,
filename: P
) -> Result<()>
&self,
image: &Image<T, C>,
filename: P
) -> Result<()>
Encode an image saving it to the file at filename. This function shouldn't add an extension preferring the user to do that instead.
Implementors
impl<T> Encoder<T, RGB> for PpmEncoder where
T: Copy + Clone + Num + NumAssignOps + NumCast + PartialOrd + Display + PixelBound + FromPrimitive,
[src]
T: Copy + Clone + Num + NumAssignOps + NumCast + PartialOrd + Display + PixelBound + FromPrimitive,
Implements the encoder trait for the PpmEncoder.
The ColourModel type argument is locked to RGB - this prevents calling
RGB::into::