Struct image::gif::GIFEncoder [] [src]

pub struct GIFEncoder<Image> {
    // some fields omitted
}

A GIF encoder.

Encodes the image either in true color using indexed colors. If the mode is set to TrueColor the image is split into multiple frames when the number of colors including transparent color exceeds 256. Pixels with an alpha value != 1.0 will be set to alpha = 0.

Methods

impl<Container> Encoder<ImageBuffer<Rgba<u8>, Container>> where Container: Deref<Target=[u8]> + DerefMut
[src]

fn new(image: ImageBuffer<Rgba<u8>, Container>, bg_color: Option<Rgb<u8>>, color_mode: ColorMode) -> Encoder<ImageBuffer<Rgba<u8>, Container>>

Creates a new GIF encoder

fn encode<W: Write>(&mut self, w: &mut W) -> Result<()>

Encodes the image