wasm-image-color-extraction
v0.1.1
Published
## Installation
Downloads
3
Readme
Getting Started
Installation
Run yarn add wasm-image-color-extraction
Usage
import init,{ extract_color } from 'wasm_image_color_extraction';
async function extractColor() {
console.log(await extract_color("https://fastly.picsum.photos/id/13/2500/1667.jpg?hmac=SoX9UoHhN8HyklRA4A3vcCWJMVtiBXUg0W4ljWTor7s"))
}
init().then(() => {
document.getElementById("button").addEventListener("click", extractColor);
})
Development
Prerequisites
- Have
wasm-pack
installed
build
Either run wasm-pack build --target web
manually or go to ./example
and run yarn build
dev
Run yarn dev
in example
folder.
publish
wasm-pack login
wasm-pack build --target web
wasm-pack publish