├── .gitignore ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── dist ├── __test__ │ ├── image.test.js │ └── image.test.js.map ├── image.js └── image.js.map ├── docs ├── assets │ ├── css │ │ ├── main.css │ │ └── main.css.map │ ├── images │ │ ├── icons.png │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ └── widgets@2x.png │ └── js │ │ ├── main.js │ │ └── search.js ├── classes │ └── _image_.wasmimage.html ├── globals.html ├── index.html ├── interfaces │ └── _image_.ipoint.html └── modules │ └── _image_.html ├── jest.config.js ├── package-lock.json ├── package.json ├── rust-image-wrapper ├── Cargo.lock ├── Cargo.toml ├── pkg │ ├── package.json │ ├── wasm_rust_image.d.ts │ ├── wasm_rust_image.js │ ├── wasm_rust_image_bg.d.ts │ └── wasm_rust_image_bg.wasm └── src │ ├── lib.rs │ ├── log.rs │ └── utils.rs ├── src ├── __test__ │ └── image.test.ts └── image.ts ├── tsconfig.json ├── tslint.json └── types ├── image.d.ts └── test.d.ts /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | # WASM/Rust 64 | target/ 65 | **/*.rs.bk 66 | bin/ 67 | wasm-pack.log 68 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/dubnium 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.md 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 140, 3 | "trailingComma": "es5", 4 | "arrowParens": "avoid", 5 | "semi": true 6 | } 7 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.6.10" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 9 | ] 10 | 11 | [[package]] 12 | name = "atty" 13 | version = "0.2.11" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | dependencies = [ 16 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 17 | "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 18 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 19 | ] 20 | 21 | [[package]] 22 | name = "autocfg" 23 | version = "0.1.2" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | 26 | [[package]] 27 | name = "backtrace" 28 | version = "0.3.14" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | dependencies = [ 31 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 32 | "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", 33 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 34 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 35 | "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 36 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 37 | ] 38 | 39 | [[package]] 40 | name = "backtrace-sys" 41 | version = "0.1.28" 42 | source = "registry+https://github.com/rust-lang/crates.io-index" 43 | dependencies = [ 44 | "cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)", 45 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 46 | ] 47 | 48 | [[package]] 49 | name = "byteorder" 50 | version = "1.3.1" 51 | source = "registry+https://github.com/rust-lang/crates.io-index" 52 | 53 | [[package]] 54 | name = "cc" 55 | version = "1.0.30" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | 58 | [[package]] 59 | name = "cfg-if" 60 | version = "0.1.6" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | 63 | [[package]] 64 | name = "console_error_panic_hook" 65 | version = "0.1.6" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | dependencies = [ 68 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 70 | ] 71 | 72 | [[package]] 73 | name = "env_logger" 74 | version = "0.6.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | dependencies = [ 77 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 78 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 79 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 80 | "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 81 | "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 82 | ] 83 | 84 | [[package]] 85 | name = "failure" 86 | version = "0.1.5" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | dependencies = [ 89 | "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 90 | "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 91 | ] 92 | 93 | [[package]] 94 | name = "failure_derive" 95 | version = "0.1.5" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | dependencies = [ 98 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 100 | "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 102 | ] 103 | 104 | [[package]] 105 | name = "futures" 106 | version = "0.1.25" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | 109 | [[package]] 110 | name = "heck" 111 | version = "0.3.1" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | dependencies = [ 114 | "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 115 | ] 116 | 117 | [[package]] 118 | name = "humantime" 119 | version = "1.2.0" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | dependencies = [ 122 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 123 | ] 124 | 125 | [[package]] 126 | name = "image" 127 | version = "0.21.0" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | dependencies = [ 130 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 131 | "jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 132 | "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 133 | "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", 134 | "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 135 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 136 | "safe-transmute 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 137 | ] 138 | 139 | [[package]] 140 | name = "jpeg-decoder" 141 | version = "0.1.15" 142 | source = "registry+https://github.com/rust-lang/crates.io-index" 143 | dependencies = [ 144 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 145 | ] 146 | 147 | [[package]] 148 | name = "js-sys" 149 | version = "0.3.14" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | dependencies = [ 152 | "wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 153 | ] 154 | 155 | [[package]] 156 | name = "lazy_static" 157 | version = "1.3.0" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | 160 | [[package]] 161 | name = "libc" 162 | version = "0.2.49" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | 165 | [[package]] 166 | name = "log" 167 | version = "0.4.6" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | dependencies = [ 170 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 171 | ] 172 | 173 | [[package]] 174 | name = "lzw" 175 | version = "0.10.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | 178 | [[package]] 179 | name = "memchr" 180 | version = "2.2.0" 181 | source = "registry+https://github.com/rust-lang/crates.io-index" 182 | 183 | [[package]] 184 | name = "memory_units" 185 | version = "0.4.0" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | 188 | [[package]] 189 | name = "nom" 190 | version = "4.2.2" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | dependencies = [ 193 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 194 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 195 | ] 196 | 197 | [[package]] 198 | name = "num-integer" 199 | version = "0.1.39" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | dependencies = [ 202 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 203 | ] 204 | 205 | [[package]] 206 | name = "num-iter" 207 | version = "0.1.37" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | dependencies = [ 210 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 212 | ] 213 | 214 | [[package]] 215 | name = "num-rational" 216 | version = "0.2.1" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | dependencies = [ 219 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 220 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 221 | ] 222 | 223 | [[package]] 224 | name = "num-traits" 225 | version = "0.2.6" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | 228 | [[package]] 229 | name = "proc-macro2" 230 | version = "0.4.27" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | dependencies = [ 233 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 234 | ] 235 | 236 | [[package]] 237 | name = "quick-error" 238 | version = "1.2.2" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | 241 | [[package]] 242 | name = "quote" 243 | version = "0.6.11" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | dependencies = [ 246 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 247 | ] 248 | 249 | [[package]] 250 | name = "redox_syscall" 251 | version = "0.1.51" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | 254 | [[package]] 255 | name = "redox_termios" 256 | version = "0.1.1" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | dependencies = [ 259 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 260 | ] 261 | 262 | [[package]] 263 | name = "regex" 264 | version = "1.1.2" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | dependencies = [ 267 | "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 268 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 269 | "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 270 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 271 | "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 272 | ] 273 | 274 | [[package]] 275 | name = "regex-syntax" 276 | version = "0.6.5" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | dependencies = [ 279 | "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 280 | ] 281 | 282 | [[package]] 283 | name = "rustc-demangle" 284 | version = "0.1.13" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | 287 | [[package]] 288 | name = "safe-transmute" 289 | version = "0.10.1" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | 292 | [[package]] 293 | name = "scoped-tls" 294 | version = "0.1.2" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | 297 | [[package]] 298 | name = "sourcefile" 299 | version = "0.1.4" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | 302 | [[package]] 303 | name = "syn" 304 | version = "0.15.27" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | dependencies = [ 307 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 308 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 309 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 310 | ] 311 | 312 | [[package]] 313 | name = "synstructure" 314 | version = "0.10.1" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | dependencies = [ 317 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 318 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 319 | "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", 320 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 321 | ] 322 | 323 | [[package]] 324 | name = "termcolor" 325 | version = "1.0.4" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | dependencies = [ 328 | "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 329 | ] 330 | 331 | [[package]] 332 | name = "termion" 333 | version = "1.5.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | dependencies = [ 336 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 337 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 338 | "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 339 | ] 340 | 341 | [[package]] 342 | name = "thread_local" 343 | version = "0.3.6" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | dependencies = [ 346 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 347 | ] 348 | 349 | [[package]] 350 | name = "ucd-util" 351 | version = "0.1.3" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | 354 | [[package]] 355 | name = "unicode-segmentation" 356 | version = "1.2.1" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | 359 | [[package]] 360 | name = "unicode-xid" 361 | version = "0.1.0" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | 364 | [[package]] 365 | name = "unreachable" 366 | version = "1.0.0" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | dependencies = [ 369 | "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 370 | ] 371 | 372 | [[package]] 373 | name = "utf8-ranges" 374 | version = "1.0.2" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | 377 | [[package]] 378 | name = "version_check" 379 | version = "0.1.5" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | 382 | [[package]] 383 | name = "void" 384 | version = "1.0.2" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | 387 | [[package]] 388 | name = "wasm-bindgen" 389 | version = "0.2.37" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | dependencies = [ 392 | "wasm-bindgen-macro 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 393 | ] 394 | 395 | [[package]] 396 | name = "wasm-bindgen-backend" 397 | version = "0.2.37" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | dependencies = [ 400 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 401 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 402 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 403 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 404 | "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", 405 | "wasm-bindgen-shared 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 406 | ] 407 | 408 | [[package]] 409 | name = "wasm-bindgen-futures" 410 | version = "0.3.14" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | dependencies = [ 413 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 414 | "js-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 415 | "wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 416 | ] 417 | 418 | [[package]] 419 | name = "wasm-bindgen-macro" 420 | version = "0.2.37" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | dependencies = [ 423 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 424 | "wasm-bindgen-macro-support 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 425 | ] 426 | 427 | [[package]] 428 | name = "wasm-bindgen-macro-support" 429 | version = "0.2.37" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | dependencies = [ 432 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 433 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 434 | "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", 435 | "wasm-bindgen-backend 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 436 | "wasm-bindgen-shared 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 437 | ] 438 | 439 | [[package]] 440 | name = "wasm-bindgen-shared" 441 | version = "0.2.37" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | 444 | [[package]] 445 | name = "wasm-bindgen-test" 446 | version = "0.2.37" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | dependencies = [ 449 | "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 450 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 451 | "js-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 452 | "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 453 | "wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 454 | "wasm-bindgen-futures 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 455 | "wasm-bindgen-test-macro 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 456 | ] 457 | 458 | [[package]] 459 | name = "wasm-bindgen-test-macro" 460 | version = "0.2.37" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | dependencies = [ 463 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 464 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 465 | ] 466 | 467 | [[package]] 468 | name = "wasm-bindgen-webidl" 469 | version = "0.2.31" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | dependencies = [ 472 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 473 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 474 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 475 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 476 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 477 | "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", 478 | "wasm-bindgen-backend 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 479 | "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 480 | ] 481 | 482 | [[package]] 483 | name = "wasm-rust-image" 484 | version = "0.1.1" 485 | dependencies = [ 486 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 487 | "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", 489 | "wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 490 | "wasm-bindgen-test 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 491 | "web-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 492 | "wee_alloc 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 493 | ] 494 | 495 | [[package]] 496 | name = "web-sys" 497 | version = "0.3.14" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | dependencies = [ 500 | "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 501 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 502 | "js-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 503 | "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 504 | "wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", 505 | "wasm-bindgen-webidl 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", 506 | ] 507 | 508 | [[package]] 509 | name = "wee_alloc" 510 | version = "0.4.3" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | dependencies = [ 513 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 514 | "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", 515 | "memory_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 516 | "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 517 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 518 | ] 519 | 520 | [[package]] 521 | name = "weedle" 522 | version = "0.8.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | dependencies = [ 525 | "nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 526 | ] 527 | 528 | [[package]] 529 | name = "winapi" 530 | version = "0.3.6" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | dependencies = [ 533 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 534 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 535 | ] 536 | 537 | [[package]] 538 | name = "winapi-i686-pc-windows-gnu" 539 | version = "0.4.0" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | 542 | [[package]] 543 | name = "winapi-util" 544 | version = "0.1.2" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | dependencies = [ 547 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 548 | ] 549 | 550 | [[package]] 551 | name = "winapi-x86_64-pc-windows-gnu" 552 | version = "0.4.0" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | 555 | [[package]] 556 | name = "wincolor" 557 | version = "1.0.1" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | dependencies = [ 560 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 561 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 562 | ] 563 | 564 | [metadata] 565 | "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" 566 | "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 567 | "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" 568 | "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" 569 | "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" 570 | "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" 571 | "checksum cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "d01c69d08ff207f231f07196e30f84c70f1c815b04f980f8b7b01ff01f05eb92" 572 | "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 573 | "checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" 574 | "checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" 575 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" 576 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" 577 | "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" 578 | "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 579 | "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" 580 | "checksum image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "52fb0666a1273dac46f9725aa4859bcd5595fc3554cf3495051b4de8db745e7d" 581 | "checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" 582 | "checksum js-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4dbd938475b240c421c270c2c0dd0f9acc3642e02d7419afd37587a34cd04e40" 583 | "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" 584 | "checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" 585 | "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 586 | "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" 587 | "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" 588 | "checksum memory_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" 589 | "checksum nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22293d25d3f33a8567cc8a1dc20f40c7eeb761ce83d0fcca059858580790cac3" 590 | "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" 591 | "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" 592 | "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" 593 | "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" 594 | "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" 595 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 596 | "checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" 597 | "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" 598 | "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 599 | "checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" 600 | "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" 601 | "checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" 602 | "checksum safe-transmute 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9604873ffe1980bc1f179103704a65c8aca141c248d9e52b7af95ff10578166e" 603 | "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" 604 | "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" 605 | "checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec" 606 | "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" 607 | "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" 608 | "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 609 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 610 | "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" 611 | "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" 612 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 613 | "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" 614 | "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" 615 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 616 | "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 617 | "checksum wasm-bindgen 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "2d85ba4917abb23ee7788330797a7cb5ac7e5e997cdc67fde6f2c8d02cc08db3" 618 | "checksum wasm-bindgen-backend 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "51f9c26bd7d30f21ce334785ec10c5ce10cba28313979d793b8dddede19da3a4" 619 | "checksum wasm-bindgen-futures 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "25ee19bc252f9fbe54dadc21713b98d7a72f1d5f4b497ef9d9c112897131c3c6" 620 | "checksum wasm-bindgen-macro 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "316e6e568644bfa2009698217cec8f612a4e2cd7460b127f52573991c7ad9f53" 621 | "checksum wasm-bindgen-macro-support 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "29982ea76a7a35b5c3c052b6035abe9b84d8b6422d8881b68bd3472270a53eec" 622 | "checksum wasm-bindgen-shared 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "59305c5b959d51437636db05bac82de2b52da2c05157e38e018c0bd54cfd9bbf" 623 | "checksum wasm-bindgen-test 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "8e8b80ffed02a5971865b6e6769398c3581b234a47c301193c44e7766b1a7a64" 624 | "checksum wasm-bindgen-test-macro 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "92b66e86a39d33a9d7d46ae7a8c90e692ff4b7ecc0a69075a060511bc687562d" 625 | "checksum wasm-bindgen-webidl 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "780c16a1a26d28695ac9af7176e11dbc3c188e6d0b3095ad51cc2d0e9e31fcc9" 626 | "checksum web-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "02c19f8ab50a089f9d7c8070c191a919c85d10a4a37c5777a08e8f94ec12c0fc" 627 | "checksum wee_alloc 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e841fed992c6c70cf2af5dbcffb0d988b1a7ffc5177ae4fb714ed14944b39d0a" 628 | "checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044" 629 | "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" 630 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 631 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 632 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 633 | "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" 634 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["rust-image-wrapper"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Peerigon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wasm-image 2 | 3 | blazing fast image processing in WebAssembly 4 | 5 | :warning: Please check the limitations. This is still a work in progress! 6 | 7 | ## Install 8 | 9 | ```bash 10 | npm i wasm-image 11 | # or 12 | yarn install wasm-image 13 | ``` 14 | 15 | If you want to use it in a frontend web project, please make sure you use a module bundler that supports WebAssembly, like [webpack](https://webpack.js.org/). 16 | 17 | WebAssembly is supported in [all modern browsers](https://caniuse.com/#feat=wasm). 18 | 19 | ## Usage 20 | 21 | The small JavaScript wrapper on top of the WASM module is `src/image.ts`. As WASM with shared memory is not well supported yet, you need to load the image into the wrapper first: 22 | 23 | ```ts 24 | import { WasmImage } from "wasm-image"; 25 | 26 | const WasmImg = new WasmImage(); 27 | WasmImg.setImage(new Uint8Array(buffer)); 28 | ``` 29 | 30 | Note: you can convert a file into a conforming buffer like this: 31 | 32 |
33 | 34 | ```ts 35 | getImageAsArrayBuffer = async (file: File): Promise => { 36 | const result = await new Promise((resolve, reject) => { 37 | const reader = new FileReader(); 38 | reader.onloadend = () => { 39 | if (reader.result instanceof ArrayBuffer) { 40 | return resolve(reader.result); 41 | } else { 42 | return reject(new Error("Could not create arraybuffer")); 43 | } 44 | }; 45 | reader.onerror = reject; 46 | reader.readAsArrayBuffer(file); 47 | }); 48 | 49 | return result; 50 | }; 51 | ``` 52 | 53 |
54 | 55 | Afterwards, you can execute as many operations as you want on the image: 56 | 57 | ```ts 58 | await WasmImg.rotate(90); 59 | await WasmImg.brighten(1); 60 | ... 61 | ``` 62 | 63 | Afterwards you can retrieve your image from WebAssembly: 64 | 65 | ```ts 66 | const modifiedImage: Uint8Array = await WasmImg.getImage(); 67 | ``` 68 | 69 | ## Supported image operations 70 | Please check our [docs](https://peerigon.github.io/wasm-image/) for all available image processing functions. 71 | 72 | ## Limitations 73 | 74 | The Rust library used for this project is [image](https://github.com/PistonDevelopers/image). All limitations that are mentioned for this library are obviously also valid for this WASM wrapper. 75 | 76 | Please make sure you read the [list of supported image formts](https://github.com/PistonDevelopers/image#2-supported-image-formats). 77 | 78 | ### WARNING 79 | The package currently only supports PNG, the rest is a work in progress. 80 | 81 | ## License 82 | 83 | MIT 84 | 85 | ## Sponsors 86 | 87 | [](https://peerigon.com) 88 | -------------------------------------------------------------------------------- /dist/__test__/image.test.js: -------------------------------------------------------------------------------- 1 | import { WasmImage } from "../image"; 2 | describe("image.ts", () => { 3 | describe("instance", () => { 4 | it("can be created", () => { 5 | const WImage = new WasmImage(); 6 | expect(WImage).toBeInstanceOf(WasmImage); 7 | }); 8 | }); 9 | }); 10 | //# sourceMappingURL=image.test.js.map -------------------------------------------------------------------------------- /dist/__test__/image.test.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"image.test.js","sourceRoot":"","sources":["../../src/__test__/image.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;YACxB,MAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;YAE/B,MAAM,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /dist/image.js: -------------------------------------------------------------------------------- 1 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 2 | return new (P || (P = Promise))(function (resolve, reject) { 3 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 4 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 5 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } 6 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 7 | }); 8 | }; 9 | import * as wasm from "wasm-rust-image"; 10 | export class WasmImage { 11 | constructor() { } 12 | setImage(image) { 13 | this.currentImage = image; 14 | } 15 | getImage() { 16 | return this.currentImage; 17 | } 18 | checkImage() { 19 | if (!this.currentImage) { 20 | throw new Error("no image set!"); 21 | } 22 | } 23 | rotate(deg) { 24 | return __awaiter(this, void 0, void 0, function* () { 25 | this.checkImage(); 26 | if ([90, 180, 270].includes(deg)) { 27 | this.currentImage = yield wasm.rotate(this.currentImage, deg); 28 | return; 29 | } 30 | throw new Error("invalid rotation degree (must be 90, 180 or 270)"); 31 | }); 32 | } 33 | grayscale() { 34 | return __awaiter(this, void 0, void 0, function* () { 35 | this.checkImage(); 36 | this.currentImage = yield wasm.grayscale(this.currentImage); 37 | }); 38 | } 39 | invert() { 40 | return __awaiter(this, void 0, void 0, function* () { 41 | this.checkImage(); 42 | this.currentImage = yield wasm.invert(this.currentImage); 43 | }); 44 | } 45 | blur(sigma) { 46 | return __awaiter(this, void 0, void 0, function* () { 47 | this.checkImage(); 48 | this.currentImage = yield wasm.blur(this.currentImage, sigma); 49 | }); 50 | } 51 | unsharpen(sigma, threshold) { 52 | return __awaiter(this, void 0, void 0, function* () { 53 | this.checkImage(); 54 | this.currentImage = yield wasm.unsharpen(this.currentImage, sigma, threshold); 55 | }); 56 | } 57 | adjustContrast(contrast) { 58 | return __awaiter(this, void 0, void 0, function* () { 59 | this.checkImage(); 60 | this.currentImage = yield wasm.adjust_contrast(this.currentImage, contrast); 61 | }); 62 | } 63 | brighten(value) { 64 | return __awaiter(this, void 0, void 0, function* () { 65 | this.checkImage(); 66 | this.currentImage = yield wasm.brighten(this.currentImage, value); 67 | }); 68 | } 69 | hueRotate(value) { 70 | return __awaiter(this, void 0, void 0, function* () { 71 | this.checkImage(); 72 | this.currentImage = yield wasm.hue_rotate(this.currentImage, value); 73 | }); 74 | } 75 | flip(axis) { 76 | return __awaiter(this, void 0, void 0, function* () { 77 | this.checkImage(); 78 | const flipMap = { 79 | horizontally: 0, 80 | vertically: 1, 81 | }; 82 | this.currentImage = yield wasm.flip(this.currentImage, flipMap[axis]); 83 | }); 84 | } 85 | crop(rectStartPoint, rectEndPoint) { 86 | return __awaiter(this, void 0, void 0, function* () { 87 | this.checkImage(); 88 | this.currentImage = yield wasm.crop(this.currentImage, rectStartPoint.x, rectStartPoint.y, rectEndPoint.x, rectEndPoint.y); 89 | }); 90 | } 91 | resize(width, height, filter, aspectRatio = "preserve") { 92 | return __awaiter(this, void 0, void 0, function* () { 93 | this.checkImage(); 94 | const filterMap = { 95 | Nearest: 0, 96 | Lanczos3: 1, 97 | Gaussian: 2, 98 | CatmullRom: 3, 99 | Triangle: 4, 100 | }; 101 | this.currentImage = yield wasm.resize(this.currentImage, width, height, filterMap[filter], aspectRatio === "preserve" || aspectRatio === "fill", aspectRatio === "fill", false); 102 | }); 103 | } 104 | thumbnail(width, height, aspectRatio = "preserve") { 105 | return __awaiter(this, void 0, void 0, function* () { 106 | this.checkImage(); 107 | this.currentImage = yield wasm.resize(this.currentImage, width, height, 0, aspectRatio === "preserve", false, true); 108 | }); 109 | } 110 | } 111 | //# sourceMappingURL=image.js.map -------------------------------------------------------------------------------- /dist/image.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"image.js","sourceRoot":"","sources":["../src/image.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,MAAM,OAAO,SAAS;IACpB,gBAAe,CAAC;IAIT,QAAQ,CAAC,KAAiB;QAC/B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC5B,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;SAClC;IACH,CAAC;IAEY,MAAM,CAAC,GAAmB;;YACrC,IAAI,CAAC,UAAU,EAAE,CAAC;YAElB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAChC,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;gBAC9D,OAAO;aACR;YAED,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;KAAA;IAEY,SAAS;;YACpB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9D,CAAC;KAAA;IAEY,MAAM;;YACjB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,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EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACxE,CAAC;KAAA;IAEY,IAAI,CAAC,cAAsB,EAAE,YAAoB;;YAC5D,IAAI,CAAC,UAAU,EAAE,CAAC;YAElB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;QAC7H,CAAC;KAAA;IAEY,MAAM,CAAC,KAAa,EAAE,MAAc,EAAE,MAAc,EAAE,cAA8C,UAAU;;YACzH,IAAI,CAAC,UAAU,EAAE,CAAC;YAElB,MAAM,SAAS,GAAG;gBAChB,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,CAAC;gBACX,UAAU,EAAE,CAAC;gBACb,QAAQ,EAAE,CAAC;aACZ,CAAC;YAEF,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CACnC,IAAI,CAAC,YAAY,EACjB,KAAK,EACL,MAAM,EACN,SAAS,CAAC,MAAM,CAAC,EACjB,WAAW,KAAK,UAAU,IAAI,WAAW,KAAK,MAAM,EACpD,WAAW,KAAK,MAAM,EACtB,KAAK,CACN,CAAC;QACJ,CAAC;KAAA;IAEY,SAAS,CAAC,KAAa,EAAE,MAAc,EAAE,cAAqC,UAAU;;YACnG,IAAI,CAAC,UAAU,EAAE,CAAC;YAElB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,KAAK,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACtH,CAAC;KAAA;CACF"} -------------------------------------------------------------------------------- /docs/assets/css/main.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": ";;;A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../../../../src/default/assets/css/setup/_mixins.sass","../../../../src/default/assets/css/setup/_grid.sass","../../../../src/default/assets/css/setup/_icons.scss","../../../../src/default/assets/css/setup/_animations.sass","../../../../src/default/assets/css/setup/_typography.sass","../../../../src/default/assets/css/_constants.sass","../../../../src/default/assets/css/layouts/_default.sass","../../../../src/default/assets/css/layouts/_minimal.sass","../../../../src/default/assets/css/elements/_comment.sass","../../../../src/default/assets/css/elements/_filter.sass","../../../../src/default/assets/css/elements/_footer.sass","../../../../src/default/assets/css/elements/_hierarchy.sass","../../../../src/default/assets/css/elements/_index.sass","../../../../src/default/assets/css/elements/_member.sass","../../../../src/default/assets/css/elements/_navigation.sass","../../../../src/default/assets/css/elements/_panel.sass","../../../../src/default/assets/css/elements/_search.sass","../../../../src/default/assets/css/elements/_signatures.sass","../../../../src/default/assets/css/elements/_sources.sass","../../../../src/default/assets/css/elements/_toolbar.sass","../../../../src/default/assets/css/elements/_images.sass"], 5 | "names": [], 6 | "file": "main.css" 7 | } 8 | -------------------------------------------------------------------------------- /docs/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peerigon/wasm-image/5fc2ff54c73e9abc5255f105a2fb13a4bf17368a/docs/assets/images/icons.png -------------------------------------------------------------------------------- /docs/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peerigon/wasm-image/5fc2ff54c73e9abc5255f105a2fb13a4bf17368a/docs/assets/images/icons@2x.png -------------------------------------------------------------------------------- /docs/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peerigon/wasm-image/5fc2ff54c73e9abc5255f105a2fb13a4bf17368a/docs/assets/images/widgets.png -------------------------------------------------------------------------------- /docs/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peerigon/wasm-image/5fc2ff54c73e9abc5255f105a2fb13a4bf17368a/docs/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /docs/assets/js/search.js: -------------------------------------------------------------------------------- 1 | var typedoc = typedoc || {}; 2 | typedoc.search = typedoc.search || {}; 3 | typedoc.search.data = {"kinds":{"1":"External module","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","4194304":"Type alias"},"rows":[{"id":0,"kind":1,"name":"\"image\"","url":"modules/_image_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":256,"name":"IPoint","url":"interfaces/_image_.ipoint.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"image\""},{"id":2,"kind":1024,"name":"x","url":"interfaces/_image_.ipoint.html#x","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"\"image\".IPoint"},{"id":3,"kind":1024,"name":"y","url":"interfaces/_image_.ipoint.html#y","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"\"image\".IPoint"},{"id":4,"kind":128,"name":"WasmImage","url":"classes/_image_.wasmimage.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"image\""},{"id":5,"kind":512,"name":"constructor","url":"classes/_image_.wasmimage.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":6,"kind":1024,"name":"currentImage","url":"classes/_image_.wasmimage.html#currentimage","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"image\".WasmImage"},{"id":7,"kind":2048,"name":"setImage","url":"classes/_image_.wasmimage.html#setimage","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":8,"kind":2048,"name":"getImage","url":"classes/_image_.wasmimage.html#getimage","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":9,"kind":2048,"name":"checkImage","url":"classes/_image_.wasmimage.html#checkimage","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"image\".WasmImage"},{"id":10,"kind":2048,"name":"rotate","url":"classes/_image_.wasmimage.html#rotate","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":11,"kind":2048,"name":"grayscale","url":"classes/_image_.wasmimage.html#grayscale","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":12,"kind":2048,"name":"invert","url":"classes/_image_.wasmimage.html#invert","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":13,"kind":2048,"name":"blur","url":"classes/_image_.wasmimage.html#blur","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":14,"kind":2048,"name":"unsharpen","url":"classes/_image_.wasmimage.html#unsharpen","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":15,"kind":2048,"name":"adjustContrast","url":"classes/_image_.wasmimage.html#adjustcontrast","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":16,"kind":2048,"name":"brighten","url":"classes/_image_.wasmimage.html#brighten","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":17,"kind":2048,"name":"hueRotate","url":"classes/_image_.wasmimage.html#huerotate","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":18,"kind":2048,"name":"flip","url":"classes/_image_.wasmimage.html#flip","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":19,"kind":2048,"name":"crop","url":"classes/_image_.wasmimage.html#crop","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":20,"kind":2048,"name":"resize","url":"classes/_image_.wasmimage.html#resize","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":21,"kind":2048,"name":"thumbnail","url":"classes/_image_.wasmimage.html#thumbnail","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"image\".WasmImage"},{"id":22,"kind":4194304,"name":"Filter","url":"modules/_image_.html#filter","classes":"tsd-kind-type-alias tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"image\""}]}; -------------------------------------------------------------------------------- /docs/classes/_image_.wasmimage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WasmImage | wasm-image 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | Menu 48 |
49 |
50 |
51 |
52 |
53 |
54 | 65 |

Class WasmImage

66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |

Hierarchy

74 |
    75 |
  • 76 | WasmImage 77 |
  • 78 |
79 |
80 |
81 |

Index

82 |
83 |
84 |
85 |

Constructors

86 | 89 |
90 |
91 |

Properties

92 | 95 |
96 |
97 |

Methods

98 | 115 |
116 |
117 |
118 |
119 |
120 |

Constructors

121 |
122 | 123 |

constructor

124 | 127 |
    128 |
  • 129 | 134 |

    Returns WasmImage

    135 |
  • 136 |
137 |
138 |
139 |
140 |

Properties

141 |
142 | 143 |

Private currentImage

144 |
currentImage: Uint8Array
145 | 150 |
151 |
152 |
153 |

Methods

154 |
155 | 156 |

adjustContrast

157 |
    158 |
  • adjustContrast(contrast: number): Promise<void>
  • 159 |
160 |
    161 |
  • 162 | 167 |

    Parameters

    168 |
      169 |
    • 170 |
      contrast: number
      171 |
    • 172 |
    173 |

    Returns Promise<void>

    174 |
  • 175 |
176 |
177 |
178 | 179 |

blur

180 |
    181 |
  • blur(sigma: number): Promise<void>
  • 182 |
183 |
    184 |
  • 185 | 190 |

    Parameters

    191 |
      192 |
    • 193 |
      sigma: number
      194 |
    • 195 |
    196 |

    Returns Promise<void>

    197 |
  • 198 |
199 |
200 |
201 | 202 |

brighten

203 |
    204 |
  • brighten(value: number): Promise<void>
  • 205 |
206 |
    207 |
  • 208 | 213 |

    Parameters

    214 |
      215 |
    • 216 |
      value: number
      217 |
    • 218 |
    219 |

    Returns Promise<void>

    220 |
  • 221 |
222 |
223 |
224 | 225 |

Private checkImage

226 |
    227 |
  • checkImage(): void
  • 228 |
229 |
    230 |
  • 231 | 236 |

    Returns void

    237 |
  • 238 |
239 |
240 |
241 | 242 |

crop

243 |
    244 |
  • crop(rectStartPoint: IPoint, rectEndPoint: IPoint): Promise<void>
  • 245 |
246 |
    247 |
  • 248 | 253 |

    Parameters

    254 |
      255 |
    • 256 |
      rectStartPoint: IPoint
      257 |
    • 258 |
    • 259 |
      rectEndPoint: IPoint
      260 |
    • 261 |
    262 |

    Returns Promise<void>

    263 |
  • 264 |
265 |
266 |
267 | 268 |

flip

269 |
    270 |
  • flip(axis: "horizontally" | "vertically"): Promise<void>
  • 271 |
272 |
    273 |
  • 274 | 279 |

    Parameters

    280 |
      281 |
    • 282 |
      axis: "horizontally" | "vertically"
      283 |
    • 284 |
    285 |

    Returns Promise<void>

    286 |
  • 287 |
288 |
289 |
290 | 291 |

getImage

292 |
    293 |
  • getImage(): Uint8Array
  • 294 |
295 |
    296 |
  • 297 | 302 |

    Returns Uint8Array

    303 |
  • 304 |
305 |
306 |
307 | 308 |

grayscale

309 |
    310 |
  • grayscale(): Promise<void>
  • 311 |
312 |
    313 |
  • 314 | 319 |

    Returns Promise<void>

    320 |
  • 321 |
322 |
323 |
324 | 325 |

hueRotate

326 |
    327 |
  • hueRotate(value: number): Promise<void>
  • 328 |
329 |
    330 |
  • 331 | 336 |

    Parameters

    337 |
      338 |
    • 339 |
      value: number
      340 |
    • 341 |
    342 |

    Returns Promise<void>

    343 |
  • 344 |
345 |
346 |
347 | 348 |

invert

349 |
    350 |
  • invert(): Promise<void>
  • 351 |
352 |
    353 |
  • 354 | 359 |

    Returns Promise<void>

    360 |
  • 361 |
362 |
363 |
364 | 365 |

resize

366 |
    367 |
  • resize(width: number, height: number, filter: Filter, aspectRatio?: "preserve" | "fill" | "mangle"): Promise<void>
  • 368 |
369 |
    370 |
  • 371 | 376 |

    Parameters

    377 |
      378 |
    • 379 |
      width: number
      380 |
    • 381 |
    • 382 |
      height: number
      383 |
    • 384 |
    • 385 |
      filter: Filter
      386 |
    • 387 |
    • 388 |
      Default value aspectRatio: "preserve" | "fill" | "mangle" = "preserve"
      389 |
    • 390 |
    391 |

    Returns Promise<void>

    392 |
  • 393 |
394 |
395 |
396 | 397 |

rotate

398 |
    399 |
  • rotate(deg: 90 | 180 | 270): Promise<void>
  • 400 |
401 |
    402 |
  • 403 | 408 |

    Parameters

    409 |
      410 |
    • 411 |
      deg: 90 | 180 | 270
      412 |
    • 413 |
    414 |

    Returns Promise<void>

    415 |
  • 416 |
417 |
418 |
419 | 420 |

setImage

421 |
    422 |
  • setImage(image: Uint8Array): void
  • 423 |
424 |
    425 |
  • 426 | 431 |

    Parameters

    432 |
      433 |
    • 434 |
      image: Uint8Array
      435 |
    • 436 |
    437 |

    Returns void

    438 |
  • 439 |
440 |
441 |
442 | 443 |

thumbnail

444 |
    445 |
  • thumbnail(width: number, height: number, aspectRatio?: "preserve" | "mangle"): Promise<void>
  • 446 |
447 |
    448 |
  • 449 | 454 |

    Parameters

    455 |
      456 |
    • 457 |
      width: number
      458 |
    • 459 |
    • 460 |
      height: number
      461 |
    • 462 |
    • 463 |
      Default value aspectRatio: "preserve" | "mangle" = "preserve"
      464 |
    • 465 |
    466 |

    Returns Promise<void>

    467 |
  • 468 |
469 |
470 |
471 | 472 |

unsharpen

473 |
    474 |
  • unsharpen(sigma: number, threshold: number): Promise<void>
  • 475 |
476 |
    477 |
  • 478 | 483 |

    Parameters

    484 |
      485 |
    • 486 |
      sigma: number
      487 |
    • 488 |
    • 489 |
      threshold: number
      490 |
    • 491 |
    492 |

    Returns Promise<void>

    493 |
  • 494 |
495 |
496 |
497 |
498 | 580 |
581 |
582 | 641 |
642 |

Generated using TypeDoc

643 |
644 |
645 | 646 | 647 | 648 | -------------------------------------------------------------------------------- /docs/globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | wasm-image 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | Menu 48 |
49 |
50 |
51 |
52 |
53 |
54 | 59 |

wasm-image

60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |

Index

68 |
69 |
70 |
71 |

External modules

72 | 75 |
76 |
77 |
78 |
79 |
80 | 96 |
97 |
98 | 157 |
158 |

Generated using TypeDoc

159 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | wasm-image 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | Menu 48 |
49 |
50 |
51 |
52 |
53 |
54 | 59 |

wasm-image

60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |

wasm-image

68 |

blazing fast image processing in WebAssembly

69 |

Install

70 |
npm i wasm-image
 71 | # or
 72 | yarn install wasm-image
73 |

If you want to use it in a frontend web project, please make sure you use a module bundler that supports WebAssembly, like webpack.

74 |

WebAssembly is supported in all modern browsers.

75 |

Usage

76 |

The small JavaScript wrapper on top of the WASM module is src/image.ts. As WASM with shared memory is not well supported yet, you need to load the image into the wrapper first:

77 |
import { WasmImage } from "wasm-image";
 78 | 
 79 | const WasmImg = new WasmImage();
 80 | WasmImg.setImage(new Uint8Array(buffer));
81 |

Note: you can convert a file into a conforming buffer like this

82 |
83 |
getImageAsArrayBuffer = async (file: File): Promise<ArrayBuffer> => {
 84 |   const result = await new Promise<ArrayBuffer>((resolve, reject) => {
 85 |     const reader = new FileReader();
 86 |     reader.onloadend = () => {
 87 |       if (reader.result instanceof ArrayBuffer) {
 88 |         return resolve(reader.result);
 89 |       } else {
 90 |         return reject(new Error("Could not create arraybuffer"));
 91 |       }
 92 |     };
 93 |     reader.onerror = reject;
 94 |     reader.readAsArrayBuffer(file);
 95 |   });
 96 | 
 97 |   return result;
 98 | };
99 |
100 |

Afterwards, you can execute as many operations as you want on the image:

101 |
await WasmImg.rotate(90);
102 | await WasmImg.brighten(1);
103 | ...
104 |

Afterwards you can retrieve your image from WebAssembly:

105 |
const modifiedImage: Uint8Array = await WasmImg.getImage();
106 |

Limitations

107 |

The Rust library used for this project is image. All limitations that are mentioned for this library are obviously also valid for this WASM wrapper. Please make sure you read the list of supported image formts.

108 |

License

109 |

MIT

110 |

Sponsors

111 |

112 |
113 |
114 | 130 |
131 |
132 | 191 |
192 |

Generated using TypeDoc

193 |
194 |
195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /docs/interfaces/_image_.ipoint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IPoint | wasm-image 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | Menu 48 |
49 |
50 |
51 |
52 |
53 |
54 | 65 |

Interface IPoint

66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |

Hierarchy

74 |
    75 |
  • 76 | IPoint 77 |
  • 78 |
79 |
80 |
81 |

Index

82 |
83 |
84 |
85 |

Properties

86 |
    87 |
  • x
  • 88 |
  • y
  • 89 |
90 |
91 |
92 |
93 |
94 |
95 |

Properties

96 |
97 | 98 |

x

99 |
x: number
100 | 105 |
106 |
107 | 108 |

y

109 |
y: number
110 | 115 |
116 |
117 |
118 | 155 |
156 |
157 | 216 |
217 |

Generated using TypeDoc

218 |
219 |
220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /docs/modules/_image_.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | "image" | wasm-image 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | Menu 48 |
49 |
50 |
51 |
52 |
53 |
54 | 62 |

External module "image"

63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |

Index

71 |
72 |
73 |
74 |

Classes

75 | 78 |
79 |
80 |

Interfaces

81 | 84 |
85 |
86 |

Type aliases

87 | 90 |
91 |
92 |
93 |
94 |
95 |

Type aliases

96 |
97 | 98 |

Filter

99 |
Filter: "Nearest" | "Triangle" | "CatmullRom" | "Gaussian" | "Lanczos3"
100 | 105 |
106 |
107 |
108 | 133 |
134 |
135 | 194 |
195 |

Generated using TypeDoc

196 |
197 |
198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "node", 4 | moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "wasm"], 5 | rootDir: "src/", 6 | transform: { 7 | "^.+\\.rs$": "rs-jest", 8 | "^.+\\.(t|j)sx?$": "ts-jest", 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wasm-image", 3 | "version": "0.1.0", 4 | "description": " an image manipulation wrapper, JS API for Rust image", 5 | "main": "dist/image.js", 6 | "scripts": { 7 | "test": "jest", 8 | "tsc:watch": "tsc --watch", 9 | "make": "cd rust-image-wrapper && wasm-pack build && cd .. && tsc", 10 | "generate:doc": "typedoc" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/peerigon/wasm-image.git" 15 | }, 16 | "keywords": [ 17 | "image", 18 | "wasm", 19 | "rust", 20 | "typescript" 21 | ], 22 | "husky": { 23 | "hooks": { 24 | "pre-commit": "lint-staged" 25 | } 26 | }, 27 | "lint-staged": { 28 | "**/src/**/*.{ts,tsx,css}": [ 29 | "tslint --fix", 30 | "prettier --write", 31 | "git add" 32 | ] 33 | }, 34 | "author": "Peerigon GmbH", 35 | "license": "MIT", 36 | "bugs": { 37 | "url": "https://github.com/peerigon/wasm-image/issues" 38 | }, 39 | "homepage": "https://github.com/peerigon/wasm-image#readme", 40 | "devDependencies": { 41 | "@types/jest": "^24.0.9", 42 | "husky": "^1.3.1", 43 | "jest": "^24.1.0", 44 | "lint-staged": "^8.1.5", 45 | "prettier": "^1.16.4", 46 | "rs-jest": "^1.1.0", 47 | "ts-jest": "^24.0.0", 48 | "tslint": "^5.13.1", 49 | "tslint-config-prettier": "^1.18.0", 50 | "typedoc": "^0.14.2", 51 | "typescript": "^3.3.3333" 52 | }, 53 | "dependencies": { 54 | "wasm-rust-image": "file:rust-image-wrapper/pkg" 55 | }, 56 | "types": "types/image.d.ts" 57 | } 58 | -------------------------------------------------------------------------------- /rust-image-wrapper/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasm-rust-image" 3 | version = "0.1.1" 4 | authors = ["Peerigon GmbH DynamicImage { 34 | panic::set_hook(Box::new(console_error_panic_hook::hook)); 35 | let img = match image::load_from_memory(_array) { 36 | Ok(img) => img, 37 | Err(error) => { 38 | log!("There was a problem opening the file: {:?}", error); 39 | panic!("There was a problem opening the file: {:?}", error) 40 | } 41 | }; 42 | return img; 43 | } 44 | 45 | fn get_image_as_array(_img: DynamicImage) -> Vec { 46 | // Create fake "file" 47 | let mut c = Cursor::new(Vec::new()); 48 | 49 | match _img.write_to(&mut c, ImageFormat::PNG) { 50 | Ok(c) => c, 51 | Err(error) => { 52 | log!( 53 | "There was a problem writing the resulting buffer: {:?}", 54 | error 55 | ); 56 | panic!( 57 | "There was a problem writing the resulting buffer: {:?}", 58 | error 59 | ) 60 | } 61 | }; 62 | c.seek(SeekFrom::Start(0)).unwrap(); 63 | 64 | // Read the "file's" contents into a vector 65 | let mut out = Vec::new(); 66 | c.read_to_end(&mut out).unwrap(); 67 | 68 | log!("Sends array back"); 69 | return out; 70 | } 71 | 72 | #[wasm_bindgen] 73 | pub fn rotate(_array: &[u8], _deg: u16) -> Vec { 74 | let mut img = load_image_from_array(_array); 75 | 76 | img = match _deg { 77 | 90 => img.rotate90(), 78 | 180 => img.rotate180(), 79 | 270 => img.rotate270(), 80 | _ => img, 81 | }; 82 | 83 | return get_image_as_array(img); 84 | } 85 | 86 | #[wasm_bindgen] 87 | pub fn grayscale(_array: &[u8]) -> Vec { 88 | let mut img = load_image_from_array(_array); 89 | img = img.grayscale(); 90 | return get_image_as_array(img); 91 | } 92 | 93 | #[wasm_bindgen] 94 | pub fn invert(_array: &[u8]) -> Vec { 95 | let mut img = load_image_from_array(_array); 96 | img.invert(); 97 | return get_image_as_array(img); 98 | } 99 | 100 | #[wasm_bindgen] 101 | pub fn blur(_array: &[u8], _sigma: f32) -> Vec { 102 | let mut img = load_image_from_array(_array); 103 | img = img.blur(_sigma); 104 | return get_image_as_array(img); 105 | } 106 | 107 | #[wasm_bindgen] 108 | pub fn unsharpen(_array: &[u8], _sigma: f32, _threshold: i32) -> Vec { 109 | let mut img = load_image_from_array(_array); 110 | img = img.unsharpen(_sigma, _threshold); 111 | return get_image_as_array(img); 112 | } 113 | 114 | #[wasm_bindgen] 115 | pub fn adjust_contrast(_array: &[u8], _contrast: f32) -> Vec { 116 | let mut img = load_image_from_array(_array); 117 | img = img.adjust_contrast(_contrast); 118 | return get_image_as_array(img); 119 | } 120 | 121 | #[wasm_bindgen] 122 | pub fn brighten(_array: &[u8], _value: i32) -> Vec { 123 | let mut img = load_image_from_array(_array); 124 | img = img.brighten(_value); 125 | return get_image_as_array(img); 126 | } 127 | 128 | #[wasm_bindgen] 129 | pub fn hue_rotate(_array: &[u8], _value: i32) -> Vec { 130 | let mut img = load_image_from_array(_array); 131 | img = img.huerotate(_value); 132 | return get_image_as_array(img); 133 | } 134 | 135 | #[wasm_bindgen] 136 | pub fn flip(_array: &[u8], _axis: u8) -> Vec { 137 | let mut img = load_image_from_array(_array); 138 | img = match _axis { 139 | 0 => img.fliph(), 140 | 1 => img.flipv(), 141 | _ => img, 142 | }; 143 | return get_image_as_array(img); 144 | } 145 | 146 | #[wasm_bindgen] 147 | pub fn crop(_array: &[u8], _start_x: u32, _start_y: u32, _end_x: u32, _end_y: u32) -> Vec { 148 | log!("Received buffer"); 149 | let mut img = load_image_from_array(_array); 150 | img = img.crop(_start_x, _start_y, _end_x, _end_y); 151 | return get_image_as_array(img); 152 | } 153 | 154 | #[wasm_bindgen] 155 | pub fn resize( 156 | _array: &[u8], 157 | _width: u32, 158 | _height: u32, 159 | _filter: u8, 160 | _aspect_ratio_preserve: bool, 161 | _fill: bool, 162 | _as_thumbnail: bool, 163 | ) -> Vec { 164 | log!("Received buffer"); 165 | 166 | let _checked_filter: image::FilterType = match _filter { 167 | 0 => image::FilterType::Nearest, 168 | 1 => image::FilterType::Lanczos3, 169 | 2 => image::FilterType::Gaussian, 170 | 3 => image::FilterType::CatmullRom, 171 | 4 => image::FilterType::Triangle, 172 | _ => image::FilterType::Nearest, 173 | }; 174 | 175 | let mut img = load_image_from_array(_array); 176 | 177 | if _aspect_ratio_preserve { 178 | if _as_thumbnail { 179 | img = img.thumbnail(_width, _height); 180 | } else { 181 | if _fill { 182 | img = img.resize_to_fill(_width, _height, _checked_filter); 183 | } else { 184 | img = img.resize(_width, _height, _checked_filter); 185 | } 186 | } 187 | } else { 188 | if _as_thumbnail { 189 | img = img.thumbnail_exact(_width, _height); 190 | } else { 191 | img = img.resize_exact(_width, _height, _checked_filter); 192 | } 193 | }; 194 | 195 | return get_image_as_array(img); 196 | ;} 197 | -------------------------------------------------------------------------------- /rust-image-wrapper/src/log.rs: -------------------------------------------------------------------------------- 1 | extern crate web_sys; 2 | 3 | // A macro to provide `println!(..)`-style syntax for `console.log` logging. 4 | #[macro_use] 5 | macro_rules! log { 6 | ( $( $t:tt )* ) => { 7 | web_sys::console::log_1(&format!( $( $t )* ).into()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /rust-image-wrapper/src/utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peerigon/wasm-image/5fc2ff54c73e9abc5255f105a2fb13a4bf17368a/rust-image-wrapper/src/utils.rs -------------------------------------------------------------------------------- /src/__test__/image.test.ts: -------------------------------------------------------------------------------- 1 | import { WasmImage } from "../image"; 2 | 3 | describe("image.ts", () => { 4 | describe("instance", () => { 5 | it("can be created", () => { 6 | const WImage = new WasmImage(); 7 | 8 | expect(WImage).toBeInstanceOf(WasmImage); 9 | }); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/image.ts: -------------------------------------------------------------------------------- 1 | import * as wasm from "wasm-rust-image"; 2 | 3 | type Filter = "Nearest" | "Triangle" | "CatmullRom" | "Gaussian" | "Lanczos3"; 4 | interface IPoint { 5 | x: number; 6 | y: number; 7 | } 8 | 9 | export class WasmImage { 10 | constructor() {} 11 | 12 | private currentImage: Uint8Array; 13 | 14 | public setImage(image: Uint8Array): void { 15 | this.currentImage = image; 16 | } 17 | 18 | public getImage(): Uint8Array { 19 | return this.currentImage; 20 | } 21 | 22 | private checkImage() { 23 | if (!this.currentImage) { 24 | throw new Error("no image set!"); 25 | } 26 | } 27 | 28 | public async rotate(deg: 90 | 180 | 270) { 29 | this.checkImage(); 30 | 31 | if ([90, 180, 270].includes(deg)) { 32 | this.currentImage = await wasm.rotate(this.currentImage, deg); 33 | return; 34 | } 35 | 36 | throw new Error("invalid rotation degree (must be 90, 180 or 270)"); 37 | } 38 | 39 | public async grayscale() { 40 | this.checkImage(); 41 | this.currentImage = await wasm.grayscale(this.currentImage); 42 | } 43 | 44 | public async invert() { 45 | this.checkImage(); 46 | this.currentImage = await wasm.invert(this.currentImage); 47 | } 48 | 49 | public async blur(sigma: number) { 50 | this.checkImage(); 51 | this.currentImage = await wasm.blur(this.currentImage, sigma); 52 | } 53 | 54 | public async unsharpen(sigma: number, threshold: number) { 55 | this.checkImage(); 56 | this.currentImage = await wasm.unsharpen(this.currentImage, sigma, threshold); 57 | } 58 | 59 | public async adjustContrast(contrast: number) { 60 | this.checkImage(); 61 | this.currentImage = await wasm.adjust_contrast(this.currentImage, contrast); 62 | } 63 | 64 | public async brighten(value: number) { 65 | this.checkImage(); 66 | this.currentImage = await wasm.brighten(this.currentImage, value); 67 | } 68 | 69 | public async hueRotate(value: number) { 70 | this.checkImage(); 71 | this.currentImage = await wasm.hue_rotate(this.currentImage, value); 72 | } 73 | 74 | public async flip(axis: "horizontally" | "vertically") { 75 | this.checkImage(); 76 | 77 | const flipMap = { 78 | horizontally: 0, 79 | vertically: 1, 80 | }; 81 | this.currentImage = await wasm.flip(this.currentImage, flipMap[axis]); 82 | } 83 | 84 | public async crop(rectStartPoint: IPoint, rectEndPoint: IPoint) { 85 | this.checkImage(); 86 | 87 | this.currentImage = await wasm.crop(this.currentImage, rectStartPoint.x, rectStartPoint.y, rectEndPoint.x, rectEndPoint.y); 88 | } 89 | 90 | public async resize(width: number, height: number, filter: Filter, aspectRatio: "preserve" | "fill" | "mangle" = "preserve") { 91 | this.checkImage(); 92 | 93 | const filterMap = { 94 | Nearest: 0, 95 | Lanczos3: 1, 96 | Gaussian: 2, 97 | CatmullRom: 3, 98 | Triangle: 4, 99 | }; 100 | 101 | this.currentImage = await wasm.resize( 102 | this.currentImage, 103 | width, 104 | height, 105 | filterMap[filter], 106 | aspectRatio === "preserve" || aspectRatio === "fill", 107 | aspectRatio === "fill", 108 | false 109 | ); 110 | } 111 | 112 | public async thumbnail(width: number, height: number, aspectRatio: "preserve" | "mangle" = "preserve") { 113 | this.checkImage(); 114 | 115 | this.currentImage = await wasm.resize(this.currentImage, width, height, 0, aspectRatio === "preserve", false, true); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { "*": ["types/*"] }, 4 | "target": "es6", 5 | "module": "esnext", 6 | "lib": ["es5", "es6", "es2017", "es2018", "dom"], 7 | "rootDir": "src/", 8 | "outDir": "./dist", 9 | "downlevelIteration": true, 10 | "declaration": true, 11 | "declarationDir": "types/", 12 | "experimentalDecorators": true, 13 | "emitDecoratorMetadata": true, 14 | "moduleResolution": "node", 15 | "resolveJsonModule": true, 16 | "sourceMap": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "noImplicitReturns": true, 19 | "noImplicitThis": false, 20 | "noImplicitAny": true, 21 | "strictNullChecks": true, 22 | "suppressImplicitAnyIndexErrors": true, 23 | "noUnusedLocals": false, 24 | "baseUrl": "/", 25 | "skipLibCheck": true, 26 | "esModuleInterop": true 27 | }, 28 | "include": ["src/**/*.ts"], 29 | "exclude": ["node_modules", "dist", "**/__test__"], 30 | "typedocOptions": { 31 | "mode": "modules", 32 | "out": "docs" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["tslint:recommended", "tslint-config-prettier"], 3 | "linterOptions": { 4 | "exclude": ["config/**/*.js", "node_modules/**/*.ts"] 5 | }, 6 | "defaultSeverity": "warning", 7 | "rules": { 8 | "member-ordering": false, 9 | "jsx-no-lambda": false, 10 | "object-literal-sort-keys": false, 11 | "ordered-imports": [ 12 | true, 13 | { 14 | "module-source-path": "basename" 15 | } 16 | ], 17 | "trailing-comma": [ 18 | true, 19 | { 20 | "multiline": "always", 21 | "singleline": "never", 22 | "esSpecCompliant": true 23 | } 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /types/image.d.ts: -------------------------------------------------------------------------------- 1 | declare type Filter = "Nearest" | "Triangle" | "CatmullRom" | "Gaussian" | "Lanczos3"; 2 | interface IPoint { 3 | x: number; 4 | y: number; 5 | } 6 | export declare class WasmImage { 7 | constructor(); 8 | private currentImage; 9 | setImage(image: Uint8Array): void; 10 | getImage(): Uint8Array; 11 | private checkImage; 12 | rotate(deg: 90 | 180 | 270): Promise; 13 | grayscale(): Promise; 14 | invert(): Promise; 15 | blur(sigma: number): Promise; 16 | unsharpen(sigma: number, threshold: number): Promise; 17 | adjustContrast(contrast: number): Promise; 18 | brighten(value: number): Promise; 19 | hueRotate(value: number): Promise; 20 | flip(axis: "horizontally" | "vertically"): Promise; 21 | crop(rectStartPoint: IPoint, rectEndPoint: IPoint): Promise; 22 | resize(width: number, height: number, filter: Filter, aspectRatio?: "preserve" | "fill" | "mangle"): Promise; 23 | thumbnail(width: number, height: number, aspectRatio?: "preserve" | "mangle"): Promise; 24 | } 25 | export {}; 26 | -------------------------------------------------------------------------------- /types/test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | --------------------------------------------------------------------------------