On 2/2/12 9:03 PM, Glenn Maynard wrote:

    With that scheme, though, if you were really referencing an image,
    then your toDataURL and toBlob output, given no optional
    parameters were specified, and the file format were the same, well
    it could be a copy of the binary data.


That's the whole idea. You can transparently bypass the process of blitting to a backbuffer for this case (modulo the zero alpha issue). It's just an optimization.

Oh, that's not a use case I need. There's no real overhead.

I need the use case of Image.toBlob() returning a binary copy of the resource, metadata and all, in its original and pure form. That way I don't have to XHR after or before hand, and I can still get progressive rendering and whatever else comes along with the browser implementation of the Image object.

It ought to spout off a state error if image has not loaded yet, a security error if cors isn't met, I'm going to be using <img crossorigin>, cause that's what I do.

I actually don't need Image.toBlob() to be used for image format conversion, though that'd be up to the implementer.
Canvas.toBlob() is a PNG by default.
Image.toBlob() is format agnostic by default.


-Charles

Reply via email to