Struct GifEncoder
pub struct GifEncoder<W: Write> { /* private fields */ }
GIF encoder.
Implementations
impl<W: Write> GifEncoder<W>
fn new(w: W) -> GifEncoder<W>Creates a new GIF encoder with a speed of 1. This prioritizes quality over performance at any cost.
fn new_with_speed(w: W, speed: i32) -> GifEncoder<W>Create a new GIF encoder, and has the speed parameter
speed. SeeFrame::from_rgba_speedfor more information.fn set_repeat(&mut self, repeat: Repeat) -> ImageResult<()>Set the repeat behaviour of the encoded GIF
fn encode(&mut self, data: &[u8], width: u32, height: u32, color: ExtendedColorType) -> ImageResult<()>Encode a single image.
fn encode_frame(&mut self, img_frame: Frame) -> ImageResult<()>Encode one frame of animation.
fn encode_frames<F>(&mut self, frames: F) -> ImageResult<()> where F: IntoIterator<Item = Frame>,Encodes Frames. Consider using
try_encode_framesinstead to encode ananimation::Frameslike iterator.fn try_encode_frames<F>(&mut self, frames: F) -> ImageResult<()> where F: IntoIterator<Item = ImageResult<Frame>>,Try to encode a collection of
ImageResult<animation::Frame>objects. Use this function to encode ananimation::Frameslike iterator. Whenever anErritem is encountered, that value is returned without further actions.
Trait Implementations
impl<W: Write> ImageEncoder for GifEncoder<W>
fn write_image(self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>