Struct image::ppm::PPMEncoder
[−]
[src]
pub struct PPMEncoder<'a, W: 'a> { /* fields omitted */ }A representation of a PPM encoder.
Methods
impl<'a, W: Write> PPMEncoder<'a, W>[src]
pub fn new(w: &mut W) -> PPMEncoder<W>[src]
Create a new PPMEncoder from the Writer w.
pub fn encode(
&mut self,
im: &[u8],
width: u32,
height: u32,
color: ColorType
) -> Result<()>[src]
&mut self,
im: &[u8],
width: u32,
height: u32,
color: ColorType
) -> Result<()>
Encode the buffer im as a PPM image.
width and height are the dimensions of the buffer.
color is the buffers ColorType.