rust-editor 0.1.6 → 0.1.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rust-editor",
3
3
  "type": "module",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "files": [
6
6
  "rust_editor_bg.wasm",
7
7
  "rust_editor.js",
package/rust_editor.d.ts CHANGED
@@ -14,6 +14,8 @@ export function grayscale_image(image_data: Uint8Array): Uint8Array;
14
14
  export function adjust_saturation_image(image_data: Uint8Array, saturation: number): Uint8Array;
15
15
  export function adjust_exposure_image(image_data: Uint8Array, exposure: number): Uint8Array;
16
16
  export function adjust_contrasts_image(image_data: Uint8Array, contrasts: number): Uint8Array;
17
+ export function adjust_temperature_image(image_data: Uint8Array, temperature: number): Uint8Array;
18
+ export function adjust_tint_image(image_data: Uint8Array, tint: number): Uint8Array;
17
19
 
18
20
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
19
21
 
@@ -33,6 +35,8 @@ export interface InitOutput {
33
35
  readonly adjust_saturation_image: (a: number, b: number, c: number) => [number, number];
34
36
  readonly adjust_exposure_image: (a: number, b: number, c: number) => [number, number];
35
37
  readonly adjust_contrasts_image: (a: number, b: number, c: number) => [number, number];
38
+ readonly adjust_temperature_image: (a: number, b: number, c: number) => [number, number];
39
+ readonly adjust_tint_image: (a: number, b: number, c: number) => [number, number];
36
40
  readonly __wbindgen_export_0: WebAssembly.Table;
37
41
  readonly __wbindgen_malloc: (a: number, b: number) => number;
38
42
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
package/rust_editor.js CHANGED
@@ -236,6 +236,34 @@ export function adjust_contrasts_image(image_data, contrasts) {
236
236
  return v2;
237
237
  }
238
238
 
239
+ /**
240
+ * @param {Uint8Array} image_data
241
+ * @param {number} temperature
242
+ * @returns {Uint8Array}
243
+ */
244
+ export function adjust_temperature_image(image_data, temperature) {
245
+ const ptr0 = passArray8ToWasm0(image_data, wasm.__wbindgen_malloc);
246
+ const len0 = WASM_VECTOR_LEN;
247
+ const ret = wasm.adjust_temperature_image(ptr0, len0, temperature);
248
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
249
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
250
+ return v2;
251
+ }
252
+
253
+ /**
254
+ * @param {Uint8Array} image_data
255
+ * @param {number} tint
256
+ * @returns {Uint8Array}
257
+ */
258
+ export function adjust_tint_image(image_data, tint) {
259
+ const ptr0 = passArray8ToWasm0(image_data, wasm.__wbindgen_malloc);
260
+ const len0 = WASM_VECTOR_LEN;
261
+ const ret = wasm.adjust_tint_image(ptr0, len0, tint);
262
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
263
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
264
+ return v2;
265
+ }
266
+
239
267
  async function __wbg_load(module, imports) {
240
268
  if (typeof Response === 'function' && module instanceof Response) {
241
269
  if (typeof WebAssembly.instantiateStreaming === 'function') {
Binary file