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

Method set_max_colors

src/attr.rs:88–94  ·  view source on GitHub ↗
(&mut self, colors: u32)

Source from the content-addressed store, hash-verified

86 /// It's better to use `set_quality()`
87 #[inline]
88 pub fn set_max_colors(&mut self, colors: u32) -> Result<(), Error> {
89 if !(2..=256).contains(&colors) {
90 return Err(Error::ValueOutOfRange);
91 }
92 self.max_colors = colors as PalLen;
93 Ok(())
94 }
95
96 /// Range 0-100, roughly like JPEG.
97 ///

Callers 4

remap_ordFunction · 0.80
liq_set_max_colorsFunction · 0.80
getsetFunction · 0.80
background_to_nopFunction · 0.80

Calls

no outgoing calls

Tested by 2

getsetFunction · 0.64
background_to_nopFunction · 0.64