MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / set_dithering_level

Method set_dithering_level

src/quant.rs:134–142  ·  view source on GitHub ↗

Set to 1.0 to get nice smooth image

(&mut self, value: f32)

Source from the content-addressed store, hash-verified

132
133 /// Set to 1.0 to get nice smooth image
134 pub fn set_dithering_level(&mut self, value: f32) -> Result<(), Error> {
135 if !(0. ..=1.).contains(&value) {
136 return Err(ValueOutOfRange);
137 }
138
139 self.remapped = None;
140 self.dither_level = value;
141 Ok(())
142 }
143
144 /// The default is sRGB gamma (~1/2.2)
145 pub fn set_output_gamma(&mut self, value: f64) -> Result<(), Error> {

Callers 6

remap_ordFunction · 0.80
remap_floydFunction · 0.80
liq_set_dithering_levelFunction · 0.80
poke_itFunction · 0.80
background_to_nopFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 2

poke_itFunction · 0.64
background_to_nopFunction · 0.64