Black Cid
Black Cid

Reputation: 446

HTML5 canvas FAST pixel manipulation

I need manipulate pixels of canvas in real time, there is any way to do this?

I can't use getImageData or createImageData, are extremly slow.

Upvotes: 0

Views: 2807

Answers (1)

Mikko Ohtamaa
Mikko Ohtamaa

Reputation: 83768

Yes. However your question lacks details what, why and how you try to do this, so it is not possible to give you a direct answer.

Here is an Mozilla example of real-time video filtering using <canvas>.

https://developer.mozilla.org/samples/video/chroma-key/index.xhtml

If your computational operations are too slow for Javascript, write a WebGL shader and run the filtering operation on GPU:

http://evanw.github.com/webgl-filter/

Upvotes: 2

Related Questions