MCPcopy Index your code
hub / github.com/ImageOptim/libimagequant / quantize

Method quantize

imagequant-sys/org/pngquant/PngQuant.java:55–61  ·  view source on GitHub ↗

Performs quantization (chooses optimal palette for the given Image). Returned object can be used to customize remapping and reused to remap other images to the same palette. @link http://pngquant.org/lib/#liq_quantize_image @return null on failure

(Image img)

Source from the content-addressed store, hash-verified

53 * @return null on failure
54 */
55 public Result quantize(Image img) {
56 try {
57 return new Result(this, img);
58 } catch(PngQuantException e) {
59 return null;
60 }
61 }
62
63 /**
64 * Remapped images won't use more than given number of colors (may use less if setQuality() is used)

Callers 4

getRemappedMethod · 0.95
liq_quantize_imageFunction · 0.45
liq_image_quantizeFunction · 0.45
liq_histogram_quantizeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected