ctx-blur
v1.0.2
Published
Applies a blur filter to a canvas
Downloads
22
Maintainers
Readme
ctx-blur
Applies a blur filter to a canvas
Usage
var transform = cBlur(options)
options (object) - Options for blurring:
- radius {number} - guassian blur radius
returns (function) transform - A function that accepts a canvas and returns it blurred
Examples
javascript (browser)
const cBlur = require('ctx-blur')
var canvas = document.getElementById('aCanvas')
cBlur({ sigma: 2, radius: 2 })(canvas, function (err, newCanvas) {
...
})
Node.js
const cBlur = require('ctx-blur')
var Canvas = require('canvas')
var canvas = new Canvas()
cIdentity({ sigma: 2, radius: 2 })(canvas, function (err, newCanvas) {
...
})