pub struct GifEncoder;Expand description
Stateless pure-Rust GIF89a LZW encoder producing spec-compliant animated GIF streams.
Implementations§
Source§impl GifEncoder
Spec-compliant pure-Rust GIF89a LZW encoding for GifEncoder.
impl GifEncoder
Spec-compliant pure-Rust GIF89a LZW encoding for GifEncoder.
Sourcepub fn encode(
logical_width: u16,
logical_height: u16,
global_palette: &[[u8; 3]],
netscape_loop: Option<u16>,
frames: &[GifEncodeFrameInput],
) -> Vec<u8> ⓘ
pub fn encode( logical_width: u16, logical_height: u16, global_palette: &[[u8; 3]], netscape_loop: Option<u16>, frames: &[GifEncodeFrameInput], ) -> Vec<u8> ⓘ
Encodes a complete spec-compliant GIF89a animated image stream with LZW compression, Netscape loop count, GCE, interlacing, and local palettes.
§Arguments
u16- Logical screen width in pixels.u16- Logical screen height in pixels.&[[u8; 3]]- Global Color Table RGB triplets (may be empty if every frame supplies a local palette).Option<u16>- Optional Netscape 2.0 loop count (Some(0)= infinite,Some(n)=nloops).&[GifEncodeFrameInput]- Ordered animation frames to encode.
§Returns
Vec<u8>- Encoded GIF89a binary payload.
Trait Implementations§
Auto Trait Implementations§
impl Forget for GifEncoder
impl Freeze for GifEncoder
impl Move for GifEncoder
impl RefUnwindSafe for GifEncoder
impl Send for GifEncoder
impl Sync for GifEncoder
impl Unpin for GifEncoder
impl UnsafeUnpin for GifEncoder
impl UnwindSafe for GifEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more