k-centroid-scaler 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/k_centroid_scaler.js
CHANGED
|
@@ -266,13 +266,13 @@ export function quantize_colors_kmeans(image_data, width, height, num_colors, it
|
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* @param {Uint8Array} image_data
|
|
269
|
-
* @param {number}
|
|
269
|
+
* @param {number} num_colors
|
|
270
270
|
* @returns {ColorPalette}
|
|
271
271
|
*/
|
|
272
|
-
export function extract_palette(image_data,
|
|
272
|
+
export function extract_palette(image_data, num_colors) {
|
|
273
273
|
const ptr0 = passArray8ToWasm0(image_data, wasm.__wbindgen_export_1);
|
|
274
274
|
const len0 = WASM_VECTOR_LEN;
|
|
275
|
-
const ret = wasm.extract_palette(ptr0, len0,
|
|
275
|
+
const ret = wasm.extract_palette(ptr0, len0, num_colors);
|
|
276
276
|
return ColorPalette.__wrap(ret);
|
|
277
277
|
}
|
|
278
278
|
|
|
Binary file
|