W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2010

[whatwg] HTML Canvas Element getBlob

From: Glenn Maynard <glenn@zewt.org>
Date: Mon, 27 Dec 2010 20:04:29 -0500
Message-ID: <AANLkTikky12f5oy0ZL6d_9eCB_iBh4=1-oXJs7-kivH_@mail.gmail.com>
On Mon, Dec 27, 2010 at 7:25 PM, Charles Pritchard <chuck at jumis.com> wrote:
> With the File API, readAsXXX is as far as things have gotten.
> There's no precedent, yet, for deflate compression, sha1/md5 checksum, etc.

There's nothing like that synchronously either, though.  If you mean
there are no async calls for purely CPU-bound operations (vs. the
network-bound XHR and I/O-bound File/FS-API), then you're probably
right about that.

> Using an ArrayBuffer, with onprogress events would be more flexible (and
> verbose) than using a getAsyncBlob method.

It almost seems like the API this hints at is exactly that of
FileReader/FileReaderSync (minus readAsText), with
FileReaderSync.readAsDataURL obsoleting Canvas.toDataURL.

I agree that having no API for this at all in the coming generation of
browsers by waiting for something like this to be specced and
implemented would be a loss, though; it's too important.  It would
also be partially redundant if Canvas access in worker threads ever

Glenn Maynard
Received on Monday, 27 December 2010 17:04:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:02 UTC