pub struct SpriteSheetConfig {
pub cell_width: u32,
pub cell_height: u32,
pub cols: u32,
pub count: usize,
pub strategy: ThumbnailStrategy,
pub quality: u8,
}Expand description
Configuration for generating a sprite sheet from a video.
Fields§
§cell_width: u32Width of each thumbnail cell.
cell_height: u32Height of each thumbnail cell.
cols: u32Number of columns in the sprite sheet.
count: usizeTotal number of thumbnails to generate.
strategy: ThumbnailStrategyStrategy for selecting timestamps.
quality: u8JPEG quality (0-100, used when encoding the sprite sheet to JPEG).
Implementations§
Source§impl SpriteSheetConfig
impl SpriteSheetConfig
Sourcepub fn default_web() -> Self
pub fn default_web() -> Self
Returns a sensible default for web video players (160×90, 5 cols, 100 frames).
Sourcepub fn high_density(count: usize) -> Self
pub fn high_density(count: usize) -> Self
Returns a high-density config suitable for long-form content.
Trait Implementations§
Source§impl Clone for SpriteSheetConfig
impl Clone for SpriteSheetConfig
Source§fn clone(&self) -> SpriteSheetConfig
fn clone(&self) -> SpriteSheetConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SpriteSheetConfig
impl RefUnwindSafe for SpriteSheetConfig
impl Send for SpriteSheetConfig
impl Sync for SpriteSheetConfig
impl Unpin for SpriteSheetConfig
impl UnsafeUnpin for SpriteSheetConfig
impl UnwindSafe for SpriteSheetConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more