Fabric.js manipulate Image object pixel by pixel to change color
问题 I want to get the data of an image of a fabric.Image object to loop through each pixel and change its color if it's a given color to another given color. But I don't want to get the data of the entire canvas , only of that specific object. Something like this - changeColor = (object, targetColor, replacementColor) => { data = object.getData(); for(var i = 0, n = data.length; i<n; i+=4){ let r = data[i]; let g = data[i + 1]; let b = data[i + 2]; if(r === targetColor.r && g === targetColor.g &&