The core code comes from here http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
Install with npm
$ npm install stack-blur-to-url
Or install with yarn
$ yarn add stackBlurToUrl
import stackBlurToUrl from 'stack-blur-to-url';
Or umd builds are also available
<script src="path/to/stack-blur-to-url.js"></script>
Will expose the global variable to window.stackBlurToUrl
.
// Only need image address and blur radius
stackBlurToUrl('./banner.png', 100).then(url => {
console.log(url);
});
MIT © Harvey Zack