{"name":"stackblur-canvas","version":"3.0.0","keywords":["stackblur","blur","canvas","gaussian"],"author":{"name":"Mario Klingemann"},"license":"MIT","_id":"stackblur-canvas@3.0.0","maintainers":[{"name":"brettz9","email":"brettz9@yahoo.com"},{"name":"flozz","email":"npm-3@flogisoft.com"}],"contributors":[{"name":"Brett Zamir"}],"homepage":"http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html","bugs":{"url":"https://github.com/flozz/StackBlur/issues"},"dist":{"shasum":"bc3fc0c7a1a60a134d628ec2f387124b1b17e6cc","tarball":"http://registry-npm.ywwl.com/stackblur-canvas/download/stackblur-canvas-3.0.0.tgz","fileCount":16,"integrity":"sha512-BTbpAj0SNgpTwqKS3aacbI8p3/Ix50i8jAKome/YnM29DZVgriOZ+3V5GAf73nukjZY7xTf0TxdTgFKh4vsAKQ==","signatures":[{"sig":"MEYCIQDrqhG0wvpY8toKB+Lj3WqNjsLG9lxBojRCGAVULpYJBQIhAMeirEm0zwmwtyzVT5P7kkjPybNVlOLvSUhNOxRJd3KO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":156532,"size":33070,"noattachment":false,"key":"/stackblur-canvas/-/stackblur-canvas-3.0.0.tgz"},"main":"dist/stackblur.js","type":"module","_from":"file:stackblur-canvas-3.0.0.tgz","engines":{"node":">=0.1.16"},"exports":{"import":"./dist/stackblur.mjs","require":"./dist/stackblur.js"},"scripts":{"docs":"rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.json src","lint":"npm run eslint --","test":"npm run eslint && npm run rollup && echo \"Error: no test specified\" && exit 1","start":"open-cli http://localhost:8081/demo/ && http-server -p 8081","eslint":"eslint --ext=js,cjs,md,html .","rollup":"rollup -c","open-docs":"npm run docs && open-cli http://localhost:8081/docs/jsdoc/ && http-server -p 8081"},"_npmUser":{"name":"brettz9","email":"brettz9@yahoo.com"},"_resolved":"/private/var/folders/2n/_szg3q3d15n9mn2jd_q91cym0000gn/T/0eb52e65b60dd7fe050f32c86db4dd62/stackblur-canvas-3.0.0.tgz","_integrity":"sha512-BTbpAj0SNgpTwqKS3aacbI8p3/Ix50i8jAKome/YnM29DZVgriOZ+3V5GAf73nukjZY7xTf0TxdTgFKh4vsAKQ==","repository":{"url":"git+https://github.com/flozz/StackBlur.git","type":"git"},"_npmVersion":"11.8.0","description":"Fast and almost Gaussian blur by Mario Klingemann","directories":{},"_nodeVersion":"22.16.0","browserslist":{"target":"cover 100%"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.5","eslint":"^9.39.2","rollup":"4.57.1","open-cli":"^8.0.0","@babel/core":"^7.29.0","http-server":"^14.1.1","rollup-plugin-re":"^1.0.7","@babel/preset-env":"^7.29.0","@rollup/plugin-babel":"^6.1.0","@rollup/plugin-terser":"^0.4.4","eslint-config-ash-nazg":"39.11.0","eslint-config-standard":"^17.1.0"},"_npmOperationalInternal":{"tmp":"tmp/stackblur-canvas_3.0.0_1770098823505_0.3900242058007686","host":"s3://npm-registry-packages-npm-production"},"readme":"# StackBlur.js\n\n[![NPM Version](https://img.shields.io/npm/v/stackblur-canvas.svg)][pkg-npm]\n[![License](https://img.shields.io/npm/l/stackblur-canvas.svg)](https://github.com/flozz/StackBlur/blob/master/COPYING)\n\nStackBlur.js is a fast, almost Gaussian blur created by Mario Klingemann.\n\n  * **More informations:** <http://incubator.quasimondo.com/processing/fast_blur_deluxe.php>\n  * **Algorithm:** <https://medium.com/better-programming/blurring-image-algorithm-example-in-android-cec81911cd5e>\n  * **Demo:** <http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html>\n\nOriginal source:\n\n  * <http://www.quasimondo.com/StackBlurForCanvas/StackBlur.js>\n\n## Getting Started\n\n### Standalone version\n\nTo use the standalone version,\n\ndownload the [latest zip][dl-zip-master] from Github or clone the repository\n\n```\ngit clone git@github.com:flozz/StackBlur.git\n```\n\nand include the `dist/stackblur.js` or `dist/stackblur.min.js` file in your HTML page:\n\n```html\n<script src=\"StackBlur/dist/stackblur.js\"></script>\n```\n\n### Node\n\nTo use the [NPM package][pkg-npm],\n\ninstall the package:\n\n```\nnpm install --save stackblur-canvas\n```\n\nand require it where needed\n\n```js\nconst StackBlur = require('stackblur-canvas');\n```\n\n### Browsers\n\nIf you are only supporting modern browsers, you may use ES6 Modules directly:\n\n```js\nimport * as StackBlur from\n  './node_modules/stackblur-canvas/dist/stackblur-es.min.js';\n```\n\nOr, if you are using Rollup in your own project, use the [node-resolve](https://github.com/rollup/rollup-plugin-node-resolve) plugin,\nand import by just referencing the module:\n\n```js\nimport * as StackBlur from 'stackblur-canvas';\n```\n\n## API\n\nSee also the docs in [docs/jsdoc](./docs/jsdoc/index.html).\n\n**Image as source:**\n\n```js\nStackBlur.image(sourceImage, targetCanvas, radius, blurAlphaChannel);\n```\n\n  * `sourceImage`: the `HTMLImageElement` or its `id`.\n  * `targetCanvas`: the `HTMLCanvasElement` or its `id`.\n  * `radius`: the radius of the blur.\n  * `blurAlphaChannel`: Set it to `true` if you want to blur a RGBA image (optional, default = `false`)\n\n**RGBA Canvas as source:**\n\n```js\nStackBlur.canvasRGBA(targetCanvas, topX, topY, width, height, radius);\n```\n\n  * `targetCanvas`: the `HTMLCanvasElement`.\n  * `topX`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `topY`: the vertical coordinate of the top-left corner of the rectangle to blur.\n  * `width`: the width of the rectangle to blur.\n  * `height`: the height of the rectangle to blur.\n  * `radius`: the radius of the blur.\n\n**RGB Canvas as source:**\n\n```js\nStackBlur.canvasRGB(targetCanvas, topX, topY, width, height, radius);\n```\n\n  * `targetCanvas`: the `HTMLCanvasElement`.\n  * `topX`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `topY`: the vertical coordinate of the top-left corner of the rectangle to blur.\n  * `width`: the width of the rectangle to blur.\n  * `height`: the height of the rectangle to blur.\n  * `radius`: the radius of the blur.\n\n**RGBA ImageData as source:**\n\n```js\nStackBlur.imageDataRGBA(imageData, topX, topY, width, height, radius);\n```\n\n  * `imageData`: the canvas' `ImageData`.\n  * `topX`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `topY`: the vertical coordinate of the top-left corner of the rectangle to blur.\n  * `width`: the width of the rectangle to blur.\n  * `height`: the height of the rectangle to blur.\n  * `radius`: the radius of the blur.\n\n**RGB ImageData as source:**\n\n```js\nStackBlur.imageDataRGB(imageData, topX, topY, width, height, radius);\n```\n\n  * `imageData`: the canvas' `ImageData`.\n  * `topX`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `topY`: the vertical coordinate of the top-left corner of the rectangle to blur.\n  * `width`: the width of the rectangle to blur.\n  * `height`: the height of the rectangle to blur.\n  * `radius`: the radius of the blur.\n\n\n## Hacking\n\n### Building\n\nThis library is built using [Rollup](https://rollupjs.org/guide/en).\nIf you change something in the `src/` folder, use the following command\nto re-build the files in the `dist/` folder:\n\n`npm run rollup`\n\n\n[dl-zip-master]: https://github.com/flozz/StackBlur/archive/master.zip\n[pkg-npm]: https://www.npmjs.com/package/stackblur-canvas\n[grunt]: http://gruntjs.com/\n","publish_time":1770098823740,"_cnpm_publish_time":1770098823740,"dist-tags":{"latest":"3.0.1"}}