rust-editor 0.2.2 → 0.2.3
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 +1 -1
- package/rust_editor.d.ts +2 -0
- package/rust_editor.js +15 -0
- package/rust_editor_bg.wasm +0 -0
package/package.json
CHANGED
package/rust_editor.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export function adjust_tint_image(image_data: Uint8Array, tint: number): Uint8Ar
|
|
|
12
12
|
export function adjust_exposure_image(image_data: Uint8Array, exposure: number): Uint8Array;
|
|
13
13
|
export function adjust_contrasts_image(image_data: Uint8Array, contrasts: number): Uint8Array;
|
|
14
14
|
export function adjust_color_image(image_data: Uint8Array, saturation: number, temperature: number, tint: number): Uint8Array;
|
|
15
|
+
export function adjust_light_image(image_data: Uint8Array, contrasts: number, exposure: number): Uint8Array;
|
|
15
16
|
|
|
16
17
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
17
18
|
|
|
@@ -29,6 +30,7 @@ export interface InitOutput {
|
|
|
29
30
|
readonly adjust_exposure_image: (a: number, b: number, c: number) => [number, number];
|
|
30
31
|
readonly adjust_contrasts_image: (a: number, b: number, c: number) => [number, number];
|
|
31
32
|
readonly adjust_color_image: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
33
|
+
readonly adjust_light_image: (a: number, b: number, c: number, d: number) => [number, number];
|
|
32
34
|
readonly __wbindgen_export_0: WebAssembly.Table;
|
|
33
35
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
34
36
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
package/rust_editor.js
CHANGED
|
@@ -204,6 +204,21 @@ export function adjust_color_image(image_data, saturation, temperature, tint) {
|
|
|
204
204
|
return v2;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
/**
|
|
208
|
+
* @param {Uint8Array} image_data
|
|
209
|
+
* @param {number} contrasts
|
|
210
|
+
* @param {number} exposure
|
|
211
|
+
* @returns {Uint8Array}
|
|
212
|
+
*/
|
|
213
|
+
export function adjust_light_image(image_data, contrasts, exposure) {
|
|
214
|
+
const ptr0 = passArray8ToWasm0(image_data, wasm.__wbindgen_malloc);
|
|
215
|
+
const len0 = WASM_VECTOR_LEN;
|
|
216
|
+
const ret = wasm.adjust_light_image(ptr0, len0, contrasts, exposure);
|
|
217
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
218
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
219
|
+
return v2;
|
|
220
|
+
}
|
|
221
|
+
|
|
207
222
|
async function __wbg_load(module, imports) {
|
|
208
223
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
209
224
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
package/rust_editor_bg.wasm
CHANGED
|
Binary file
|