{"name":"stackblur-canvas","version":"1.4.0","description":"Fast and almost Gaussian blur by Mario Klingemann","main":"src/stackblur.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/flozz/StackBlur.git"},"keywords":["stackblur","blur","canvas","gaussian"],"author":{"name":"Mario Klingemann"},"license":"MIT","bugs":{"url":"https://github.com/flozz/StackBlur/issues"},"devDependencies":{"grunt":"^0.4.5","grunt-browserify":"^3.8.0","grunt-contrib-uglify":"^0.9.1"},"dependencies":{"grunt-cli":"^1.2.0"},"gitHead":"4a40e5213d90e3c5a3ec4f03e2758a2f5294a121","homepage":"https://github.com/flozz/StackBlur#readme","_id":"stackblur-canvas@1.4.0","_shasum":"50ba7d8d7273967b47fdd586bb6b31c277a9d463","_from":".","_npmVersion":"3.10.3","_nodeVersion":"4.2.6","_npmUser":{"name":"flozz","email":"npm@flogisoft.com"},"maintainers":[{"name":"flozz","email":"npm@flogisoft.com"}],"dist":{"shasum":"50ba7d8d7273967b47fdd586bb6b31c277a9d463","tarball":"http://registry-npm.ywwl.com/stackblur-canvas/download/stackblur-canvas-1.4.0.tgz","integrity":"sha512-ymXxFctFSuVOkzgMLbwQrtXO9nE02BeySQLU9LoA8SMYl5OplsXtfjPf4E9p4iWK16uPw0CMOA4zS5NnGM3mrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArbgldhP+ybwBg3cuTm9P3yYqmqjpZt4/CRKxRG6s2nAiBOHPCL/7xo6N8GTJqAV7QOKN/Ruof84c16TTjcRFbe5w=="}],"size":8004,"noattachment":false,"key":"/stackblur-canvas/-/stackblur-canvas-1.4.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/stackblur-canvas-1.4.0.tgz_1476988399951_0.5347810050006956"},"directories":{},"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, top_x, top_y, width, height, radius);\n```\n\n  * `targetCanvas`: the `HTMLCanvasElement`.\n  * `top_x`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `top_y`: 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, top_x, top_y, width, height, radius);\n```\n\n  * `targetCanvas`: the `HTMLCanvasElement`.\n  * `top_x`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `top_y`: 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, top_x, top_y, width, height, radius);\n```\n\n  * `imageData`: the canvas' `ImageData`.\n  * `top_x`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `top_y`: 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, top_x, top_y, width, height, radius);\n```\n\n  * `imageData`: the canvas' `ImageData`.\n  * `top_x`: the horizontal coordinate of the top-left corner of the rectangle to blur.\n  * `top_y`: 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":1476988400589,"_cnpm_publish_time":1476988400589,"dist-tags":{"latest":"3.0.1"}}