smart-downscaler 0.6.1 → 0.6.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/package.json +4 -2
- package/smart_downscaler.d.ts +0 -120
- package/smart_downscaler.js +7 -1083
- package/smart_downscaler_bg.js +986 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Pixagram"
|
|
6
6
|
],
|
|
7
7
|
"description": "Intelligent pixel art downscaler with region-aware color quantization",
|
|
8
|
-
"version": "0.6.
|
|
8
|
+
"version": "0.6.2",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"smart_downscaler_bg.wasm",
|
|
16
16
|
"smart_downscaler.js",
|
|
17
|
+
"smart_downscaler_bg.js",
|
|
17
18
|
"smart_downscaler.d.ts"
|
|
18
19
|
],
|
|
19
20
|
"main": "smart_downscaler.js",
|
|
20
21
|
"types": "smart_downscaler.d.ts",
|
|
21
22
|
"sideEffects": [
|
|
23
|
+
"./smart_downscaler.js",
|
|
22
24
|
"./snippets/*"
|
|
23
25
|
],
|
|
24
26
|
"keywords": [
|
|
@@ -28,4 +30,4 @@
|
|
|
28
30
|
"quantization",
|
|
29
31
|
"wasm"
|
|
30
32
|
]
|
|
31
|
-
}
|
|
33
|
+
}
|
package/smart_downscaler.d.ts
CHANGED
|
@@ -114,123 +114,3 @@ export function quantize_to_palette(image_data: Uint8Array, width: number, heigh
|
|
|
114
114
|
export function rgb_to_oklab(r: number, g: number, b: number): Float32Array;
|
|
115
115
|
|
|
116
116
|
export function version(): string;
|
|
117
|
-
|
|
118
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
119
|
-
|
|
120
|
-
export interface InitOutput {
|
|
121
|
-
readonly memory: WebAssembly.Memory;
|
|
122
|
-
readonly __wbg_coloranalysisresult_free: (a: number, b: number) => void;
|
|
123
|
-
readonly __wbg_colorentry_free: (a: number, b: number) => void;
|
|
124
|
-
readonly __wbg_get_wasmdownscaleconfig_color_rarity: (a: number) => number;
|
|
125
|
-
readonly __wbg_get_wasmdownscaleconfig_detail_boost: (a: number) => number;
|
|
126
|
-
readonly __wbg_get_wasmdownscaleconfig_edge_weight: (a: number) => number;
|
|
127
|
-
readonly __wbg_get_wasmdownscaleconfig_hierarchy_min_size: (a: number) => number;
|
|
128
|
-
readonly __wbg_get_wasmdownscaleconfig_hierarchy_threshold: (a: number) => number;
|
|
129
|
-
readonly __wbg_get_wasmdownscaleconfig_k_centroid: (a: number) => number;
|
|
130
|
-
readonly __wbg_get_wasmdownscaleconfig_k_centroid_iterations: (a: number) => number;
|
|
131
|
-
readonly __wbg_get_wasmdownscaleconfig_kmeans_iterations: (a: number) => number;
|
|
132
|
-
readonly __wbg_get_wasmdownscaleconfig_max_color_preprocess: (a: number) => number;
|
|
133
|
-
readonly __wbg_get_wasmdownscaleconfig_max_resolution_mp: (a: number) => number;
|
|
134
|
-
readonly __wbg_get_wasmdownscaleconfig_neighbor_weight: (a: number) => number;
|
|
135
|
-
readonly __wbg_get_wasmdownscaleconfig_palette_size: (a: number) => number;
|
|
136
|
-
readonly __wbg_get_wasmdownscaleconfig_refinement_iterations: (a: number) => number;
|
|
137
|
-
readonly __wbg_get_wasmdownscaleconfig_region_weight: (a: number) => number;
|
|
138
|
-
readonly __wbg_get_wasmdownscaleconfig_reserve_colors: (a: number) => number;
|
|
139
|
-
readonly __wbg_get_wasmdownscaleconfig_slic_compactness: (a: number) => number;
|
|
140
|
-
readonly __wbg_get_wasmdownscaleconfig_slic_superpixels: (a: number) => number;
|
|
141
|
-
readonly __wbg_get_wasmdownscaleconfig_two_pass_refinement: (a: number) => number;
|
|
142
|
-
readonly __wbg_set_wasmdownscaleconfig_color_rarity: (a: number, b: number) => void;
|
|
143
|
-
readonly __wbg_set_wasmdownscaleconfig_detail_boost: (a: number, b: number) => void;
|
|
144
|
-
readonly __wbg_set_wasmdownscaleconfig_edge_weight: (a: number, b: number) => void;
|
|
145
|
-
readonly __wbg_set_wasmdownscaleconfig_hierarchy_min_size: (a: number, b: number) => void;
|
|
146
|
-
readonly __wbg_set_wasmdownscaleconfig_hierarchy_threshold: (a: number, b: number) => void;
|
|
147
|
-
readonly __wbg_set_wasmdownscaleconfig_k_centroid: (a: number, b: number) => void;
|
|
148
|
-
readonly __wbg_set_wasmdownscaleconfig_k_centroid_iterations: (a: number, b: number) => void;
|
|
149
|
-
readonly __wbg_set_wasmdownscaleconfig_kmeans_iterations: (a: number, b: number) => void;
|
|
150
|
-
readonly __wbg_set_wasmdownscaleconfig_max_color_preprocess: (a: number, b: number) => void;
|
|
151
|
-
readonly __wbg_set_wasmdownscaleconfig_max_resolution_mp: (a: number, b: number) => void;
|
|
152
|
-
readonly __wbg_set_wasmdownscaleconfig_neighbor_weight: (a: number, b: number) => void;
|
|
153
|
-
readonly __wbg_set_wasmdownscaleconfig_palette_size: (a: number, b: number) => void;
|
|
154
|
-
readonly __wbg_set_wasmdownscaleconfig_refinement_iterations: (a: number, b: number) => void;
|
|
155
|
-
readonly __wbg_set_wasmdownscaleconfig_region_weight: (a: number, b: number) => void;
|
|
156
|
-
readonly __wbg_set_wasmdownscaleconfig_reserve_colors: (a: number, b: number) => void;
|
|
157
|
-
readonly __wbg_set_wasmdownscaleconfig_slic_compactness: (a: number, b: number) => void;
|
|
158
|
-
readonly __wbg_set_wasmdownscaleconfig_slic_superpixels: (a: number, b: number) => void;
|
|
159
|
-
readonly __wbg_set_wasmdownscaleconfig_two_pass_refinement: (a: number, b: number) => void;
|
|
160
|
-
readonly __wbg_wasmdownscaleconfig_free: (a: number, b: number) => void;
|
|
161
|
-
readonly __wbg_wasmdownscaleresult_free: (a: number, b: number) => void;
|
|
162
|
-
readonly analyze_colors: (a: any, b: number, c: number, d: number) => [number, number, number];
|
|
163
|
-
readonly color_distance: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
164
|
-
readonly coloranalysisresult_color_count: (a: number) => number;
|
|
165
|
-
readonly coloranalysisresult_get_color: (a: number, b: number) => number;
|
|
166
|
-
readonly coloranalysisresult_get_colors_flat: (a: number) => any;
|
|
167
|
-
readonly coloranalysisresult_success: (a: number) => number;
|
|
168
|
-
readonly coloranalysisresult_to_json: (a: number) => [number, number, number];
|
|
169
|
-
readonly coloranalysisresult_total_pixels: (a: number) => number;
|
|
170
|
-
readonly colorentry_b: (a: number) => number;
|
|
171
|
-
readonly colorentry_count: (a: number) => number;
|
|
172
|
-
readonly colorentry_g: (a: number) => number;
|
|
173
|
-
readonly colorentry_hex: (a: number) => [number, number];
|
|
174
|
-
readonly colorentry_percentage: (a: number) => number;
|
|
175
|
-
readonly colorentry_r: (a: number) => number;
|
|
176
|
-
readonly downscale: (a: any, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
177
|
-
readonly downscale_rgba: (a: any, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
178
|
-
readonly downscale_simple: (a: any, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
179
|
-
readonly downscale_with_palette: (a: any, b: number, c: number, d: number, e: number, f: any, g: number) => [number, number, number];
|
|
180
|
-
readonly extract_palette_from_image: (a: any, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
181
|
-
readonly get_chroma: (a: number, b: number, c: number) => number;
|
|
182
|
-
readonly get_lightness: (a: number, b: number, c: number) => number;
|
|
183
|
-
readonly get_palette_strategies: () => any;
|
|
184
|
-
readonly init: () => void;
|
|
185
|
-
readonly log: (a: number, b: number) => void;
|
|
186
|
-
readonly oklab_to_rgb: (a: number, b: number, c: number) => any;
|
|
187
|
-
readonly quantize_to_palette: (a: any, b: number, c: number, d: any) => [number, number, number];
|
|
188
|
-
readonly rgb_to_oklab: (a: number, b: number, c: number) => any;
|
|
189
|
-
readonly version: () => [number, number];
|
|
190
|
-
readonly wasmdownscaleconfig_exact_colors: () => number;
|
|
191
|
-
readonly wasmdownscaleconfig_fast: () => number;
|
|
192
|
-
readonly wasmdownscaleconfig_new: () => number;
|
|
193
|
-
readonly wasmdownscaleconfig_palette_strategy: (a: number) => [number, number];
|
|
194
|
-
readonly wasmdownscaleconfig_quality: () => number;
|
|
195
|
-
readonly wasmdownscaleconfig_segmentation_method: (a: number) => [number, number];
|
|
196
|
-
readonly wasmdownscaleconfig_set_palette_strategy: (a: number, b: number, c: number) => void;
|
|
197
|
-
readonly wasmdownscaleconfig_set_segmentation_method: (a: number, b: number, c: number) => void;
|
|
198
|
-
readonly wasmdownscaleconfig_vibrant: () => number;
|
|
199
|
-
readonly wasmdownscaleresult_data: (a: number) => any;
|
|
200
|
-
readonly wasmdownscaleresult_height: (a: number) => number;
|
|
201
|
-
readonly wasmdownscaleresult_indices: (a: number) => any;
|
|
202
|
-
readonly wasmdownscaleresult_palette: (a: number) => any;
|
|
203
|
-
readonly wasmdownscaleresult_palette_size: (a: number) => number;
|
|
204
|
-
readonly wasmdownscaleresult_rgb_data: (a: number) => any;
|
|
205
|
-
readonly wasmdownscaleresult_width: (a: number) => number;
|
|
206
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
207
|
-
readonly __externref_table_alloc: () => number;
|
|
208
|
-
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
209
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
210
|
-
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
211
|
-
readonly __externref_table_dealloc: (a: number) => void;
|
|
212
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
213
|
-
readonly __wbindgen_start: () => void;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
220
|
-
* a precompiled `WebAssembly.Module`.
|
|
221
|
-
*
|
|
222
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
223
|
-
*
|
|
224
|
-
* @returns {InitOutput}
|
|
225
|
-
*/
|
|
226
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
230
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
231
|
-
*
|
|
232
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
233
|
-
*
|
|
234
|
-
* @returns {Promise<InitOutput>}
|
|
235
|
-
*/
|
|
236
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|