Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (27 sloc) 594 Bytes

zelig

Classic convolution filters on top of component/convolve

Available filters

Zelig#blur()

Zelig#edgeDetect()

Zelig#emboss()

Zelig#laplace()

Zelig#gaussianBlur()

Zelig#motionBlur()

Zelig#sharpen()

Example

var zelig = require('zelig');
var canvas = document.querySelector('canvas');
var ctx = canvas.getContext('2d');

var img = new Image;
img.onload = draw;
img.src = 'maru.jpg';

function draw() {
  canvas.width = img.width;
  canvas.height = img.height;
  ctx.drawImage(img, 0, 0);
  zelig
    .emboss()
    .canvas(canvas);
}