k-centroid-scaler 1.3.9 → 1.4.0

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.
@@ -166,23 +166,6 @@ export function analyze_colors(image_data, max_colors, sort_method) {
166
166
  return ColorAnalysis.__wrap(ret);
167
167
  }
168
168
 
169
- /**
170
- * @param {Uint8Array} image_data
171
- * @param {number} original_width
172
- * @param {number} original_height
173
- * @param {number} target_width
174
- * @param {number} target_height
175
- * @param {number} centroids
176
- * @param {number} iterations
177
- * @returns {ImageResult}
178
- */
179
- export function k_centroid_resize(image_data, original_width, original_height, target_width, target_height, centroids, iterations) {
180
- const ptr0 = passArray8ToWasm0(image_data, wasm.__wbindgen_export_2);
181
- const len0 = WASM_VECTOR_LEN;
182
- const ret = wasm.k_centroid_resize(ptr0, len0, original_width, original_height, target_width, target_height, centroids, iterations);
183
- return ImageResult.__wrap(ret);
184
- }
185
-
186
169
  /**
187
170
  * @param {Uint8Array} image_data
188
171
  * @param {number} width
@@ -238,6 +221,23 @@ export function get_dominant_colors(image_data, num_colors, min_coverage) {
238
221
  return ColorAnalysis.__wrap(ret);
239
222
  }
240
223
 
224
+ /**
225
+ * @param {Uint8Array} image_data
226
+ * @param {number} orig_w
227
+ * @param {number} orig_h
228
+ * @param {number} target_w
229
+ * @param {number} target_h
230
+ * @param {number} centroids
231
+ * @param {number} iterations
232
+ * @returns {ImageResult}
233
+ */
234
+ export function k_centroid_resize(image_data, orig_w, orig_h, target_w, target_h, centroids, iterations) {
235
+ const ptr0 = passArray8ToWasm0(image_data, wasm.__wbindgen_export_2);
236
+ const len0 = WASM_VECTOR_LEN;
237
+ const ret = wasm.k_centroid_resize(ptr0, len0, orig_w, orig_h, target_w, target_h, centroids, iterations);
238
+ return ImageResult.__wrap(ret);
239
+ }
240
+
241
241
  const ColorAnalysisFinalization = (typeof FinalizationRegistry === 'undefined')
242
242
  ? { register: () => {}, unregister: () => {} }
243
243
  : new FinalizationRegistry(ptr => wasm.__wbg_coloranalysis_free(ptr >>> 0, 1));
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "k-centroid-scaler",
3
3
  "type": "module",
4
- "version": "1.3.9",
4
+ "version": "1.4.0",
5
5
  "files": [
6
6
  "k_centroid_scaler_bg.wasm",
7
7
  "k_centroid_scaler.js"