@flighthq/bitmap-wasm 0.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.
- package/LICENSE.md +9 -0
- package/README.md +43 -0
- package/dist/bitmapWasm.d.ts +41 -0
- package/dist/bitmapWasm.d.ts.map +1 -0
- package/dist/bitmapWasm.js +204 -0
- package/dist/bitmapWasm.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/wasm/bitmapWasmBytes.d.ts +2 -0
- package/dist/wasm/bitmapWasmBytes.d.ts.map +1 -0
- package/dist/wasm/bitmapWasmBytes.js +15 -0
- package/dist/wasm/bitmapWasmBytes.js.map +1 -0
- package/dist/wasm/bitmap_wasm.d.ts +136 -0
- package/dist/wasm/bitmap_wasm.js +760 -0
- package/package.json +56 -0
- package/src/bitmapWasm.test.ts +210 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export function apply_bitmap_curve_wasm(dest_data: Uint8Array, dest_descriptor: Float64Array, source_data: Uint8Array, source_descriptor: Float64Array, red_lut: Uint8Array, green_lut: Uint8Array, blue_lut: Uint8Array, alpha_lut: Uint8Array): void;
|
|
5
|
+
|
|
6
|
+
export function apply_bitmap_levels_wasm(dest_data: Uint8Array, dest_descriptor: Float64Array, source_data: Uint8Array, source_descriptor: Float64Array, black_point: number, white_point: number, gamma: number): void;
|
|
7
|
+
|
|
8
|
+
export function apply_bitmap_palette_map_wasm(dest_data: Uint8Array, dest_descriptor: Float64Array, source_data: Uint8Array, source_descriptor: Float64Array, red_map: Float64Array, green_map: Float64Array, blue_map: Float64Array, alpha_map: Float64Array): void;
|
|
9
|
+
|
|
10
|
+
export function build_bitmap_brightness_color_matrix_wasm(out: Float64Array, amount: number): void;
|
|
11
|
+
|
|
12
|
+
export function build_bitmap_contrast_color_matrix_wasm(out: Float64Array, amount: number): void;
|
|
13
|
+
|
|
14
|
+
export function build_bitmap_grayscale_color_matrix_wasm(out: Float64Array): void;
|
|
15
|
+
|
|
16
|
+
export function build_bitmap_hue_rotation_color_matrix_wasm(out: Float64Array, degrees: number): void;
|
|
17
|
+
|
|
18
|
+
export function build_bitmap_invert_color_matrix_wasm(out: Float64Array): void;
|
|
19
|
+
|
|
20
|
+
export function build_bitmap_saturation_color_matrix_wasm(out: Float64Array, amount: number): void;
|
|
21
|
+
|
|
22
|
+
export function build_bitmap_sepia_color_matrix_wasm(out: Float64Array): void;
|
|
23
|
+
|
|
24
|
+
export function color_matrix_bitmap_wasm(out: Uint8Array, source_data: Uint8Array, source_descriptor: Float64Array, matrix: Float64Array): void;
|
|
25
|
+
|
|
26
|
+
export function compare_bitmap_fingerprints_wasm(first_cells: Uint8Array, first_grid_size: number, second_cells: Uint8Array, second_grid_size: number): number;
|
|
27
|
+
|
|
28
|
+
export function concat_bitmap_color_matrix_wasm(out: Float64Array, first: Float64Array, second: Float64Array): void;
|
|
29
|
+
|
|
30
|
+
export function convolve_bitmap_wasm(out: Uint8Array, source_data: Uint8Array, source_descriptor: Float64Array, matrix: Float64Array, matrix_x: number, matrix_y: number, bias: number, edge: string, divisor: number, preserve_alpha: boolean): void;
|
|
31
|
+
|
|
32
|
+
export function copy_bitmap_alpha_wasm(dest_data: Uint8Array, dest_descriptor: Float64Array, source_data: Uint8Array, source_descriptor: Float64Array): void;
|
|
33
|
+
|
|
34
|
+
export function copy_bitmap_pixels_wasm(dest_data: Uint8Array, dest_descriptor: Float64Array, source_data: Uint8Array, source_descriptor: Float64Array, composite: boolean): void;
|
|
35
|
+
|
|
36
|
+
export function create_bitmap_fingerprint_wasm(out: Uint8Array, source_data: Uint8Array, source_width: number, source_height: number, grid_size: number): void;
|
|
37
|
+
|
|
38
|
+
export function dilate_bitmap_wasm(out: Uint8Array, source_data: Uint8Array, source_descriptor: Float64Array, radius: number): void;
|
|
39
|
+
|
|
40
|
+
export function erode_bitmap_wasm(out: Uint8Array, source_data: Uint8Array, source_descriptor: Float64Array, radius: number): void;
|
|
41
|
+
|
|
42
|
+
export function fill_bitmap_noise_wasm(data: Uint8Array, descriptor: Float64Array, seed: number, low: number, high: number, gray_scale: boolean): void;
|
|
43
|
+
|
|
44
|
+
export function fill_bitmap_perlin_noise_wasm(data: Uint8Array, descriptor: Float64Array, base_x: number, base_y: number, octaves: number, seed: number, gray_scale: boolean, stitch: boolean, channel_options: number): void;
|
|
45
|
+
|
|
46
|
+
export function fill_bitmap_rectangle_wasm(data: Uint8Array, descriptor: Float64Array, color: number): void;
|
|
47
|
+
|
|
48
|
+
export function fill_bitmap_turbulence_wasm(data: Uint8Array, descriptor: Float64Array, base_x: number, base_y: number, octaves: number, seed: number, gray_scale: boolean, stitch: boolean, channel_options: number): void;
|
|
49
|
+
|
|
50
|
+
export function get_bitmap_color_bounds_rectangle_wasm(out: Float64Array, data: Uint8Array, descriptor: Float64Array, mask: number, color: number, find_color: boolean): boolean;
|
|
51
|
+
|
|
52
|
+
export function get_bitmap_coverage_wasm(data: Uint8Array, width: number, height: number, background_color: number, channel_tolerance: number): number;
|
|
53
|
+
|
|
54
|
+
export function get_bitmap_histogram_wasm(out: Float64Array, data: Uint8Array, descriptor: Float64Array): void;
|
|
55
|
+
|
|
56
|
+
export function get_bitmap_mismatch_wasm(out: Float64Array, source_data: Uint8Array, source_width: number, source_height: number, other_data: Uint8Array, other_width: number, other_height: number, channel_tolerance: number): void;
|
|
57
|
+
|
|
58
|
+
export function merge_bitmap_channels_wasm(out_data: Uint8Array, out_descriptor: Float64Array, red_data: Uint8Array, red_descriptor: Float64Array, green_data: Uint8Array, green_descriptor: Float64Array, blue_data: Uint8Array, blue_descriptor: Float64Array, alpha_data: Uint8Array, alpha_descriptor: Float64Array): void;
|
|
59
|
+
|
|
60
|
+
export function multiply_bitmap_alpha_wasm(data: Uint8Array, descriptor: Float64Array, factor: number): void;
|
|
61
|
+
|
|
62
|
+
export function pixelate_bitmap_wasm(out: Uint8Array, source_data: Uint8Array, source_descriptor: Float64Array, block_size: number): void;
|
|
63
|
+
|
|
64
|
+
export function premultiply_bitmap_pixels_wasm(out: Uint8Array, source: Uint8Array, length: number): void;
|
|
65
|
+
|
|
66
|
+
export function set_bitmap_alpha_wasm(data: Uint8Array, descriptor: Float64Array, alpha: number): void;
|
|
67
|
+
|
|
68
|
+
export function set_bitmap_color_matrix_identity_wasm(out: Float64Array): void;
|
|
69
|
+
|
|
70
|
+
export function unpremultiply_bitmap_pixels_wasm(out: Uint8Array, source: Uint8Array, length: number): void;
|
|
71
|
+
|
|
72
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
73
|
+
|
|
74
|
+
export interface InitOutput {
|
|
75
|
+
readonly memory: WebAssembly.Memory;
|
|
76
|
+
readonly apply_bitmap_curve_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => void;
|
|
77
|
+
readonly apply_bitmap_levels_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
78
|
+
readonly apply_bitmap_palette_map_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => void;
|
|
79
|
+
readonly build_bitmap_brightness_color_matrix_wasm: (a: number, b: number, c: any, d: number) => void;
|
|
80
|
+
readonly build_bitmap_contrast_color_matrix_wasm: (a: number, b: number, c: any, d: number) => void;
|
|
81
|
+
readonly build_bitmap_grayscale_color_matrix_wasm: (a: number, b: number, c: any) => void;
|
|
82
|
+
readonly build_bitmap_hue_rotation_color_matrix_wasm: (a: number, b: number, c: any, d: number) => void;
|
|
83
|
+
readonly build_bitmap_invert_color_matrix_wasm: (a: number, b: number, c: any) => void;
|
|
84
|
+
readonly build_bitmap_saturation_color_matrix_wasm: (a: number, b: number, c: any, d: number) => void;
|
|
85
|
+
readonly build_bitmap_sepia_color_matrix_wasm: (a: number, b: number, c: any) => void;
|
|
86
|
+
readonly color_matrix_bitmap_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
87
|
+
readonly compare_bitmap_fingerprints_wasm: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
88
|
+
readonly concat_bitmap_color_matrix_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number) => void;
|
|
89
|
+
readonly convolve_bitmap_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => void;
|
|
90
|
+
readonly copy_bitmap_alpha_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
91
|
+
readonly copy_bitmap_pixels_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
92
|
+
readonly create_bitmap_fingerprint_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number) => void;
|
|
93
|
+
readonly dilate_bitmap_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number) => void;
|
|
94
|
+
readonly erode_bitmap_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number) => void;
|
|
95
|
+
readonly fill_bitmap_noise_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
96
|
+
readonly fill_bitmap_perlin_noise_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
97
|
+
readonly fill_bitmap_rectangle_wasm: (a: number, b: number, c: any, d: number, e: number, f: number) => void;
|
|
98
|
+
readonly fill_bitmap_turbulence_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
99
|
+
readonly get_bitmap_color_bounds_rectangle_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
|
|
100
|
+
readonly get_bitmap_coverage_wasm: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
101
|
+
readonly get_bitmap_histogram_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number) => void;
|
|
102
|
+
readonly get_bitmap_mismatch_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
103
|
+
readonly merge_bitmap_channels_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
|
|
104
|
+
readonly multiply_bitmap_alpha_wasm: (a: number, b: number, c: any, d: number, e: number, f: number) => void;
|
|
105
|
+
readonly pixelate_bitmap_wasm: (a: number, b: number, c: any, d: number, e: number, f: number, g: number, h: number) => void;
|
|
106
|
+
readonly premultiply_bitmap_pixels_wasm: (a: number, b: number, c: any, d: number, e: number, f: number) => void;
|
|
107
|
+
readonly set_bitmap_alpha_wasm: (a: number, b: number, c: any, d: number, e: number, f: number) => void;
|
|
108
|
+
readonly set_bitmap_color_matrix_identity_wasm: (a: number, b: number, c: any) => void;
|
|
109
|
+
readonly unpremultiply_bitmap_pixels_wasm: (a: number, b: number, c: any, d: number, e: number, f: number) => void;
|
|
110
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
111
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
112
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
113
|
+
readonly __wbindgen_start: () => void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
120
|
+
* a precompiled `WebAssembly.Module`.
|
|
121
|
+
*
|
|
122
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
123
|
+
*
|
|
124
|
+
* @returns {InitOutput}
|
|
125
|
+
*/
|
|
126
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
130
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
131
|
+
*
|
|
132
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
133
|
+
*
|
|
134
|
+
* @returns {Promise<InitOutput>}
|
|
135
|
+
*/
|
|
136
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|