HTML 5 Canvas - Get pixel data for a path
Posted
by
Mikey S.
on Stack Overflow
See other posts from Stack Overflow
or by Mikey S.
Published on 2012-09-01T21:35:05Z
Indexed on
2012/09/01
21:38 UTC
Read the original article
Hit count: 276
I wonder if is there any way I can get pixel data for the currently drawn path in the canvas tag.
I can calculate the pixel data on my own when drawing simple shapes like square or a line, but things get messy with more complicated shapes like ellipse or even a simple circle.
The reason i'm asking this is because I'm working on a web application which involves sending canvas pixels data to the server when I add a path to the canvas. The server needs to keep it's own copy of the entire canvas, and I really don't want to send the ENTIRE canvas image every single change, but only the delta for efficiency reasons...
Thanks.
© Stack Overflow or respective owner