I don’t know if this is possible, I’ve never really used html canvas, but I am aware of
var imgPixels = canvasContext.getImageData(0, 0, canvas.width, canvas.height);
but how do I use this to get for example all the pixels with a certain color and change these pixels to white?
So let’s say I have a pixel colored red:
if(pixel==red){
pixel = white;
}
that’s the simple version of what I would like but not sure how to do that…
anyone any ideas?
Do something like this (here’s the canvas cheat sheet):
Hope that helps.