Re: Image.toBlob()

On Feb 2, 2012, at 2:24 PM, "Anne van Kesteren" <annevk@opera.com> wrote:

> On Sat, 28 Jan 2012 09:27:08 +0100, Bronislav Klučka <Bronislav.Klucka@bauglir.com> wrote:
>> would it be possible to have Image.toBlob() function? We are introducing Canvas.toBlob(), image (and maybe video, audio) would be nice addition
> 
> Are the additional resource required to drawing the image on <canvas> first a bottleneck?
> 


They are a pain, and lossy.

You don't want to do drawImage then a toBlob png on an image that's a jpeg. We've had to use followup XHR calls which may or may not do another http fetch. We went the route of doing an XHR call first, but then we couldn't display nice progressive loading. Canvas also inflates the size of PNG files, typically.

Audio and video are a different thing; they will be using chunked streams.


-Charles

Received on Thursday, 2 February 2012 22:34:52 UTC