pub struct GifSaveOptions {
pub delay_cs: u16,
pub loop_count: u16,
pub dither: bool,
pub dither_strength: f32,
pub transparent: bool,
}Expand description
Per-write options for GIF encoding.
Fields§
§delay_cs: u16Delay between frames in centiseconds (1/100 s). 0 = unspecified.
loop_count: u16Number of times the animation should loop. 0 = loop forever.
dither: boolEnable blue-noise ordered dithering when mapping pixels to the palette.
dither_strength: f32Dither strength in [0, 1]. 0 = no visible dithering, 1 = full.
transparent: boolEmit a transparent background. Pixels whose source alpha is below 50% become the GIF’s transparent palette index; the rest are quantised normally. GIF transparency is 1-bit, so partially-covered (anti- aliased) edge pixels are forced fully opaque or fully transparent.
Trait Implementations§
Source§impl Clone for GifSaveOptions
impl Clone for GifSaveOptions
Source§fn clone(&self) -> GifSaveOptions
fn clone(&self) -> GifSaveOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GifSaveOptions
impl Debug for GifSaveOptions
Source§impl Default for GifSaveOptions
impl Default for GifSaveOptions
Source§impl PartialEq for GifSaveOptions
impl PartialEq for GifSaveOptions
impl StructuralPartialEq for GifSaveOptions
Auto Trait Implementations§
impl Freeze for GifSaveOptions
impl RefUnwindSafe for GifSaveOptions
impl Send for GifSaveOptions
impl Sync for GifSaveOptions
impl Unpin for GifSaveOptions
impl UnsafeUnpin for GifSaveOptions
impl UnwindSafe for GifSaveOptions
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