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

Method quantize

src/attr.rs:80–84  ·  view source on GitHub ↗

Generate palette for the image

(&self, image: &mut Image<'_>)

Source from the content-addressed store, hash-verified

78
79 /// Generate palette for the image
80 pub fn quantize(&self, image: &mut Image<'_>) -> Result<QuantizationResult, Error> {
81 let mut hist = Histogram::new(self);
82 hist.add_image(self, image)?;
83 hist.quantize_internal(self, false)
84 }
85
86 /// It's better to use `set_quality()`
87 #[inline]

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
add_imageMethod · 0.80
quantize_internalMethod · 0.80

Tested by

no test coverage detected