Bug 51652 - Add canvas.toBlob
Summary: Add canvas.toBlob
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-27 13:22 PST by Charles Pritchard
Modified: 2023-08-23 00:42 PDT (History)
11 users (show)

See Also:


Attachments

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:
http://code.google.com/p/chromium/issues/detail?id=67587
Comment 3 Ryosuke Niwa 2017-02-16 20:47:47 PST
This API has been renamed to toBlob: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
Comment 4 Anne van Kesteren 2023-08-23 00:42:39 PDT
This was added at some point.