W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: Image.toBlob()

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 2 Feb 2012 14:34:23 -0800
Message-Id: <C9A4A71A-AE78-4486-BE8C-D6D145B54C12@jumis.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>
To: Anne van Kesteren <annevk@opera.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT