pub struct DitherBuilder { /* private fields */ }Expand description
Dithered image builder
Implementations§
Source§impl DitherBuilder
impl DitherBuilder
Sourcepub fn new(image: DynamicImage) -> DitherBuilder
pub fn new(image: DynamicImage) -> DitherBuilder
Initializes a new DitherBuilder
Source§impl DitherBuilder
impl DitherBuilder
Sourcepub fn highlights(self, highlights: Rgb<u8>) -> Self
pub fn highlights(self, highlights: Rgb<u8>) -> Self
Sets the color of highlights in the dithered image
Sourcepub fn shadows(self, shadows: Rgb<u8>) -> Self
pub fn shadows(self, shadows: Rgb<u8>) -> Self
Sets the color of the shadows in the dithered image
Sourcepub fn generate(self) -> DynamicImage
pub fn generate(self) -> DynamicImage
Generate a dithered image given a set of parameters and returns a DynamicImage
Auto Trait Implementations§
impl Freeze for DitherBuilder
impl RefUnwindSafe for DitherBuilder
impl Send for DitherBuilder
impl Sync for DitherBuilder
impl Unpin for DitherBuilder
impl UnwindSafe for DitherBuilder
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> 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