TrimColor
pub struct TrimColor { pub threshold: f32,}Identify a rectangular border based on specified color and remove this border from the edges of an image.
Fields
color
HexColorIndicates what color to trim off.
An optional number between 0 and 1 indicating how different a color can be from the given trim color and still be trimmed.
This can be used if the background that is being trimmed is not uniform (all one color). Setting it to 1 will trim everything, as 1 is the largest possible color difference.
Trait implementations
impl Clone for TrimColor
impl Debug for TrimColor
impl Serialize for TrimColor
serialize
View sourcewhere S: Serializer,Parameters
- self: &Self
- serializer: S
Returns
Result<S::Ok, S::Error>