{"name":"stackblur-canvas","version":"3.0.1","description":"Fast and almost Gaussian blur by Mario Klingemann","main":"dist/stackblur.js","type":"module","types":"./index.d.ts","exports":{"import":{"types":"./index.d.ts","default":"./dist/stackblur.mjs"},"require":{"types":"./index.d.cts","default":"./dist/stackblur.js"}},"browserslist":{"target":"cover 100%"},"repository":{"type":"git","url":"git+https://github.com/flozz/StackBlur.git"},"keywords":["stackblur","blur","canvas","gaussian"],"author":{"name":"Mario Klingemann"},"homepage":"http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html","contributors":[{"name":"Brett Zamir"}],"license":"MIT","bugs":{"url":"https://github.com/flozz/StackBlur/issues"},"engines":{"node":">=0.1.16"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.2","@babel/core":"^7.29.0","@babel/preset-env":"^7.29.0","@rollup/plugin-babel":"^7.0.0","@rollup/plugin-terser":"^1.0.0","eslint":"^9.39.4","eslint-config-ash-nazg":"39.11.1","eslint-config-standard":"^17.1.0","http-server":"^14.1.1","jsdoc":"^3.6.5","open-cli":"^8.0.0","rollup":"4.59.0","rollup-plugin-re":"^1.0.7"},"scripts":{"attw":"attw --pack .","start":"open-cli http://localhost:8081/demo/ && http-server -p 8081","eslint":"eslint --ext=js,cjs,md,html .","lint":"npm run eslint --","rollup":"rollup -c","docs":"rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.json src","open-docs":"npm run docs && open-cli http://localhost:8081/docs/jsdoc/ && http-server -p 8081","test":"npm run eslint && npm run rollup && echo \"Error: no test specified\" && exit 1"},"_id":"stackblur-canvas@3.0.1","_integrity":"sha512-eJpxkL5PR39dioN3ZapIIhkjQd01wxcigCnBURzbRofZk5M+cHZUA8VwBelHLhsFW20gO9vdH6hFRIekA+jJfA==","_resolved":"/private/var/folders/2n/_szg3q3d15n9mn2jd_q91cym0000gn/T/1b159c885839f15c0e47fd6866d530e0/stackblur-canvas-3.0.1.tgz","_from":"file:stackblur-canvas-3.0.1.tgz","_nodeVersion":"22.16.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-eJpxkL5PR39dioN3ZapIIhkjQd01wxcigCnBURzbRofZk5M+cHZUA8VwBelHLhsFW20gO9vdH6hFRIekA+jJfA==","shasum":"622085eb23524fc9f01b7893a06c5f74327022b4","tarball":"http://registry-npm.ywwl.com/stackblur-canvas/download/stackblur-canvas-3.0.1.tgz","fileCount":18,"unpackedSize":156842,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDIH1d1z382RmsawyhRZDT0i9nhaBS4gqZn3RSC4Vd/EAiEAntCtDjXgjuhROulFHHZg2IGYQ2f1i572rAtLkd+pCGE="}],"size":34111,"noattachment":false,"key":"/stackblur-canvas/-/stackblur-canvas-3.0.1.tgz"},"_npmUser":{"name":"brettz9","email":"brettz9@yahoo.com"},"directories":{},"maintainers":[{"name":"brettz9","email":"brettz9@yahoo.com"},{"name":"flozz","email":"npm-3@flogisoft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stackblur-canvas_3.0.1_1773451060262_0.6119010770332205"},"_hasShrinkwrap":false,"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":1773451060409,"_cnpm_publish_time":1773451060409,"dist-tags":{"latest":"3.0.1"}}