[whatwg] HTML Canvas Element getBlob
chuck at jumis.com
Mon Dec 27 13:32:11 PST 2010
I'd like to see Blob output added to the HTML Canvas element :
Blob getBlob(in optional DOMString type, in any... args);
Currently, an image must be copied to a string using toDataURL, then to
an array buffer using base64 decoding, before it can be run through
getBlob would reduce the number of operations.
I've added a webkit bug report for it:
getBlob is already a "used" term, in the File API, this matches it nicely,
while also matching the usage of toDataURL in the HTML Canvas Element
As many vendors are supporting Blob (and createObjectURL), this seems to
be a very easy addition
to the spec, as well as various code bases. It's benefits are immediate.
There was some recent talk of it here:
Most of the discussion/objections are around other use cases. I'm presenting
a very simple case, and I don't think it needs to be held-up by the
cases mentioned (mainly, web workers).
The simple use case, is using a blob uri, instead of a data uri, within
as this means a lot less passing around of large base64 encoded png
More information about the whatwg