W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2012

[whatwg] Canvas as an object

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 30 Mar 2012 08:53:01 -0500
Message-ID: <CABirCh8TRaBQtTQgCTYVjKzK5VbsGpNQfFsQuHSzhwaq6BmRsw@mail.gmail.com>
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

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:40 UTC