[whatwg] Rich Paste & DataTransfer / DataTransferItems API

Glenn Maynard glenn at zewt.org
Mon Mar 14 19:21:58 PDT 2011

(Was Daniel's reply off-list?)

On Mon, Mar 14, 2011 at 9:14 PM, Jeb Boniakowski <jebjeb at gmail.com> wrote:
> On Mon, Mar 14, 2011 at 9:22 PM, Daniel Cheng <dcheng at google.com> wrote:
>> I'm currently 60-75% complete landing the patches for image paste support in
>> Chrome. I've chosen to expose image/png instead of a raw bitmap through
>> event.clipboardData.items in Chrome as a Blob. DataTransferItem::getAsFile()

That's a good starting point.  I'd suggest that a different entry
point is needed to support this fully.  A couple things that come to

PNG compression is expensive; on a larger image it may take 5-10
seconds; more for more aggressive compressors.  This wants an async
API, so compression doesn't block and compression can be threaded.  (A
mechanism that can support Progress Events would make a lot of sense,
too--something for much later, of course, but should at least be kept
in mind, since func(successCb, errorCb) interfaces don't handle that

The same thing applies to Canvas:
(Ian's reply)

Canvas users would also want to be able to load a pasted image without
redundant compression and decompression steps.

Glenn Maynard

More information about the whatwg mailing list