BWMode

Enumin image_optimizerfastly 0.13.1View source
pub enum BWMode {
Atkinson,
DefaultThreshold,
Threshold(u32),
}

Controls conversion of image to black and white duotone.

Variants

Atkinson

DefaultThreshold

DefaultThreshold uses the default threshold value of 49.

Threshold

Threshold can be between 0-100.

0: u32

Trait implementations

impl Clone for BWMode

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for BWMode

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

self: &Self
f: &mut $crate::fmt::Formatter

Returns

$crate::fmt::Result

impl Serialize for BWMode

serialize

View source
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,

Parameters

self: &Self
serializer: S

Returns

Result<S::Ok, S::Error>

Auto trait implementations

Blanket implementations