Mahmood Azam
Mahmood Azam

Reputation: 11

image pixel by pixel manipulation in fabric.js

Like : The getImageData() method returns an ImageData object that copies the pixel data for the specified rectangle on a canvas.

Is it possible to get similar functionality using any Fabric.js method ?

Upvotes: 1

Views: 1179

Answers (1)

daven11
daven11

Reputation: 3035

It seems the way to do this is get the context from the fabric canvas e.g.

var myFabricCanvas = new fabric.Canvas("id");
myFabricCanvas.getContext().getImageData(0, 0, inputImage.width, inputImage.height);

have a look at filters in http://fabricjs.com/fabric-intro-part-2#image_filters as well

Upvotes: 2

Related Questions