[whatwg] Canvas as an object

On Fri, Mar 30, 2012 at 8:34 AM, <nullv at gmx.com> wrote:

> My suggestion is, considering that the Canvas element can be used for
> offscreen rendering etc shouldn't it be allowed it create an object of such
> from within Worker like we can do with Image?
>

It's been wanted for a while, but there's a lot of work needed to make it
possible, so it probably won't happen soon.

If you only need to analyze the pixels of video data, however, you can
render the video frame to a canvas, call canvas.getImageData(), and send
the Uint8ClampedArray of the result to the worker.  You can't use Canvas
drawing features this way, but if you only need to examine pixels, this
works.

-- 
Glenn Maynard

Received on Friday, 30 March 2012 06:53:01 UTC