Black White with "color"

suggest change

Remove color from an image via

ctx.globalCompositeOperation = 'color';

The amount of the effect can be controled with the alpha setting

// Render the image
ctx.drawImage(image, 0, 0);

// set the composite operation
ctx.fillStyle = "white";
ctx.globalAlpha = alpha;  // alpha 0 = no effect 1 = full effect
ctx.fillRect(0, 0, image.width, image.height);

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents