-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I have the following code:
var mousePos = _this.root.getPointer(e.e);
mousePos.x = parseInt(mousePos.x);
mousePos.y = parseInt(mousePos.y);
var width = _this.root.getWidth();
var height = _this.root.getHeight();
var pixels = _this.root.getContext().getImageData(0, 0, width, height);
var pixel = (mousePos.x + mousePos.y * pixels.width) * 4;
_this.activePathsColor = new fabric['Color']('rgb(' + pixels.data[pixel] + ',' + pixels.data[pixel + 1] + ',' + pixels.data[pixel + 2] + ')');
var colorHex = '#' + _this.activePathsColor.toHex().toLowerCase();How would we use getImageDataFaster in this case.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels