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<()>
Auto Trait Implementations
impl<W> Freeze for GifEncoder<W>
where
Option<W>: Freeze,
Option<Encoder<W>>: Freeze,
impl<W> RefUnwindSafe for GifEncoder<W>
where
Option<W>: RefUnwindSafe,
Option<Encoder<W>>: RefUnwindSafe,
impl<W> Send for GifEncoder<W>
where
Option<W>: Send,
Option<Encoder<W>>: Send,
impl<W> Sync for GifEncoder<W>
where
Option<W>: Sync,
Option<Encoder<W>>: Sync,
impl<W> Unpin for GifEncoder<W>
where
Option<W>: Unpin,
Option<Encoder<W>>: Unpin,
impl<W> UnsafeUnpin for GifEncoder<W>
where
Option<W>: UnsafeUnpin,
Option<Encoder<W>>: UnsafeUnpin,
impl<W> UnwindSafe for GifEncoder<W>
where
Option<W>: UnwindSafe,
Option<Encoder<W>>: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for GifEncoder<W>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for GifEncoder<W>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for GifEncoder<W>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for GifEncoder<W>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for GifEncoder<W>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for GifEncoder<W>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for GifEncoder<W>
impl<T> Pointable for GifEncoder<W>
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for GifEncoder<W>
where
T: ?Sized,
impl<T, U> Into<U> for GifEncoder<W>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for GifEncoder<W>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for GifEncoder<W>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>