Bug 51652 - Add getBlob(in DOMString contentType)
: Add getBlob(in DOMString contentType)
Product: WebKit
Classification: Unclassified
Component: Canvas
: 528+ (Nightly build)
: PC OS X 10.5
: P2 Normal
Assigned To: Nobody
Depends on:
  Show dependency treegraph
Reported: 2010-12-27 13:22 PST by Charles Pritchard
Modified: 2012-10-17 09:17 PDT (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Charles Pritchard 2010-12-27 13:22:46 PST
Using the same semantics as toDataURL (image/png is the default output), add Blob getBlob([Optional] in DOMString contentType, [Optional] 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 createObjectURL. getBlob would reduce the number of operations.
Comment 2 Charles Pritchard 2011-09-04 10:10:05 PDT
Support for Canvas toBlob is likely to come from Chromium: