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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…