Blur HTML5 Canvas
How can I blur HTML5 canvas content?
I know I can use CSS, but I need to blur the content of the canvas so that I can manipulate it later.
+3
starbeamrainbowlabs
source
to share
1 answer
There is no built-in function for this. But you can implement your own image filter operations using context.getImageData
to get an array of raw RGBA values of the canvas data, perform a filter operation on that data, and then write it with context.putImageData
.
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation
+3
Philipp
source
to share