Struct image::ppm::PPMEncoder
[−]
[src]
pub struct PPMEncoder<'a, W: 'a> { // some fields omitted }
A representation of a PPM encoder.
Methods
impl<'a, W: Write> PPMEncoder<'a, W>
fn new(w: &mut W) -> PPMEncoder<W>
Create a new PPMEncoder from the Writer w
.
This function takes ownership of the Writer.
fn encode(&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.