Struct GifEncoder

struct GifEncoder<W: Write> { ... }

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. See Frame::from_rgba_speed for more information.

fn set_repeat(self: &mut Self, repeat: Repeat) -> ImageResult<()>

Set the repeat behaviour of the encoded GIF

fn encode(self: &mut Self, data: &[u8], width: u32, height: u32, color: ExtendedColorType) -> ImageResult<()>

Encode a single image.

fn encode_frame(self: &mut Self, img_frame: animation::Frame) -> ImageResult<()>

Encode one frame of animation.

fn encode_frames<F>(self: &mut Self, frames: F) -> ImageResult<()>
where
    F: IntoIterator<Item = animation::Frame>

Encodes Frames. Consider using try_encode_frames instead to encode an animation::Frames like iterator.

fn try_encode_frames<F>(self: &mut Self, frames: F) -> ImageResult<()>
where
    F: IntoIterator<Item = ImageResult<animation::Frame>>

Try to encode a collection of ImageResult<animation::Frame> objects. Use this function to encode an animation::Frames like iterator. Whenever an Err item is encountered, that value is returned without further actions.

impl<T> Any for GifEncoder<W>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for GifEncoder<W>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for GifEncoder<W>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for GifEncoder<W>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for GifEncoder<W>

unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into for GifEncoder<W>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for GifEncoder<W>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for GifEncoder<W>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<W> Freeze for GifEncoder<W>

impl<W> RefUnwindSafe for GifEncoder<W>

impl<W> Send for GifEncoder<W>

impl<W> Sync for GifEncoder<W>

impl<W> Unpin for GifEncoder<W>

impl<W> UnwindSafe for GifEncoder<W>