pub struct DetectOptions {
pub input: PathBuf,
pub output: PathBuf,
pub alpha_threshold: u8,
pub min_opaque_pixels: u32,
pub padding: u32,
pub row_tolerance: u32,
pub bg_hex: Option<String>,
pub bg_threshold: u8,
pub manifest_name: String,
}Expand description
Options for detecting disconnected sprites from a transparent or filtered sheet.
Fields§
§input: PathBufInput image path.
output: PathBufOutput directory where frames and manifests will be written.
alpha_threshold: u8Pixels with alpha less than or equal to this value count as transparent.
min_opaque_pixels: u32Minimum foreground pixel count required for a connected component to be kept.
padding: u32Extra padding added around each detected component.
row_tolerance: u32Vertical tolerance used when clustering detected components into rows.
bg_hex: Option<String>Optional background color used to ignore solid-color backdrops.
bg_threshold: u8Allowed per-channel distance when comparing to bg_hex.
manifest_name: StringOutput file name for the manifest, usually frames.toml.
Trait Implementations§
Source§impl Clone for DetectOptions
impl Clone for DetectOptions
Source§fn clone(&self) -> DetectOptions
fn clone(&self) -> DetectOptions
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 moreAuto Trait Implementations§
impl Freeze for DetectOptions
impl RefUnwindSafe for DetectOptions
impl Send for DetectOptions
impl Sync for DetectOptions
impl Unpin for DetectOptions
impl UnsafeUnpin for DetectOptions
impl UnwindSafe for DetectOptions
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> 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