pub struct GifOptions {
pub width: Option<u32>,
pub frame_delay: u16,
pub repeat: Option<u16>,
}Expand description
Configuration for animated GIF export.
Controls output dimensions, frame delay, repeat behaviour, and quality.
Fields§
§width: Option<u32>Target width in pixels. Height is computed to preserve aspect ratio.
None means use source resolution.
frame_delay: u16Delay between frames in hundredths of a second (default: 10 = 100 ms).
repeat: Option<u16>How many times the GIF should repeat. None means loop forever.
Implementations§
Source§impl GifOptions
impl GifOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new GifOptions with default settings.
Sourcepub fn width(self, width: u32) -> Self
pub fn width(self, width: u32) -> Self
Set the target width (height is auto-scaled to preserve aspect ratio).
Sourcepub fn with_width(self, width: u32) -> Self
pub fn with_width(self, width: u32) -> Self
Set the target width (height is auto-scaled to preserve aspect ratio).
Alias for width.
Sourcepub fn frame_delay(self, delay: u16) -> Self
pub fn frame_delay(self, delay: u16) -> Self
Set the delay between frames in hundredths of a second.
For example, 10 = 100 ms between frames ≈ 10 fps.
Sourcepub fn with_frame_delay(self, delay: u16) -> Self
pub fn with_frame_delay(self, delay: u16) -> Self
Set the delay between frames in hundredths of a second.
Alias for frame_delay.
Sourcepub fn repeat(self, repeat: Option<u16>) -> Self
pub fn repeat(self, repeat: Option<u16>) -> Self
Set the repeat count. None means loop forever.
Sourcepub fn with_repeat(self, repeat: Option<u16>) -> Self
pub fn with_repeat(self, repeat: Option<u16>) -> Self
Set the repeat count. None means loop forever.
Alias for repeat.
Trait Implementations§
Source§impl Clone for GifOptions
impl Clone for GifOptions
Source§fn clone(&self) -> GifOptions
fn clone(&self) -> GifOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GifOptions
impl Debug for GifOptions
Auto Trait Implementations§
impl Freeze for GifOptions
impl RefUnwindSafe for GifOptions
impl Send for GifOptions
impl Sync for GifOptions
impl Unpin for GifOptions
impl UnsafeUnpin for GifOptions
impl UnwindSafe for GifOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().