pub struct ProcessSheetOptions {Show 21 fields
pub input: PathBuf,
pub output_dir: PathBuf,
pub rows: u32,
pub cols: u32,
pub cell_size: u32,
pub bg_hex: String,
pub threshold: u8,
pub edge_threshold: u8,
pub fit_scale: f32,
pub trim_border: u32,
pub edge_clean_depth: u32,
pub align: FrameAlign,
pub shared_scale: bool,
pub component_mode: ComponentMode,
pub component_padding: u32,
pub min_component_area: u32,
pub edge_touch_margin: u32,
pub reject_edge_touch: bool,
pub gif_delay: u16,
pub frame_labels: Option<Vec<String>>,
pub prompt: Option<String>,
}Expand description
Options for postprocessing a magenta-backed sprite sheet into normalized frames.
Fields§
§input: PathBufInput sprite-sheet image path.
output_dir: PathBufOutput directory where all generated files will be written.
rows: u32Number of rows in the source grid.
cols: u32Number of columns in the source grid.
cell_size: u32Output square cell size for each exported frame.
bg_hex: StringRGB background color to remove, usually magenta.
threshold: u8Distance threshold used for chroma-key removal.
edge_threshold: u8More permissive edge cleanup threshold used for boundary flood fill.
fit_scale: f32Scale multiplier applied after fit-to-cell sizing.
trim_border: u32Number of pixels trimmed from each frame border before component analysis.
edge_clean_depth: u32Number of outer pixel layers cleaned to suppress border noise.
align: FrameAlignVertical placement policy in the output cell.
Use a shared scale across all frames when true.
component_mode: ComponentModeComponent selection strategy.
component_padding: u32Extra padding applied around the selected component bounding box.
min_component_area: u32Minimum connected-component area to consider during analysis.
edge_touch_margin: u32Margin used when deciding whether content touches a source cell edge.
reject_edge_touch: boolFail processing when any source frame touches the cell edge.
gif_delay: u16GIF frame duration in centiseconds.
frame_labels: Option<Vec<String>>Optional logical frame labels. Length must equal rows * cols when provided.
prompt: Option<String>Optional prompt text to persist as prompt-used.txt.
Trait Implementations§
Source§impl Clone for ProcessSheetOptions
impl Clone for ProcessSheetOptions
Source§fn clone(&self) -> ProcessSheetOptions
fn clone(&self) -> ProcessSheetOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProcessSheetOptions
impl RefUnwindSafe for ProcessSheetOptions
impl Send for ProcessSheetOptions
impl Sync for ProcessSheetOptions
impl Unpin for ProcessSheetOptions
impl UnsafeUnpin for ProcessSheetOptions
impl UnwindSafe for ProcessSheetOptions
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 more