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

Method new_image

src/attr.rs:75–77  ·  view source on GitHub ↗
(&self, pixels: VecRGBA, width: usize, height: usize, gamma: f64)

Source from the content-addressed store, hash-verified

73 /// Use 0.0 for gamma if the image is sRGB (most images are).
74 #[inline]
75 pub fn new_image<VecRGBA>(&self, pixels: VecRGBA, width: usize, height: usize, gamma: f64) -> Result<Image<'static>, Error> where VecRGBA: Into<Box<[RGBA]>> {
76 Image::new(self, pixels, width, height, gamma)
77 }
78
79 /// Generate palette for the image
80 pub fn quantize(&self, image: &mut Image<'_>) -> Result<QuantizationResult, Error> {

Callers 9

histogramFunction · 0.80
remap_ordFunction · 0.80
remap_floydFunction · 0.80
quantize_s8Function · 0.80
quantize_s1Function · 0.80
histogramFunction · 0.80
poke_itFunction · 0.80
set_importance_mapFunction · 0.80
mainFunction · 0.80

Calls 1

newFunction · 0.85

Tested by 3

histogramFunction · 0.64
poke_itFunction · 0.64
set_importance_mapFunction · 0.64