[html5] HTML5 canvas.toDataURL suggestions
darkflame at gmail.com
Wed Aug 21 04:48:40 PDT 2013
8bit color indexed PNG with optional full alpha would be nice.
You can get significant size, and thus bandwidth, savings with it. Very few
offline apps do this, so you need to go via a separate program like;
To get your png filesize down before uploading.
As most of the current png use on the web has been done without this
option, a lot of them are 30% or so bigger then they need to be.
It would be nice if online painting programs started off on the right foot
and in the long term as they are used more, this could save everyone some
Thomas & Bertines online review show:
Try it! You might even feel ambivalent about it :)
On 21 August 2013 13:27, Sigurd Lerstad <sigurd.lerstad at gmail.com> wrote:
> Thank you Ian, for your response.
> The use case for my canvas.toDataURL improvements is making a paint/drawing
> program and presenting more options to the user when exporting to a file
> format. It's as simple as that. As for your point of sending to a server,
> what if a server isn't available, what if this is an offline app?
> Anyway... I personally missed more control when developing my online paint
> program, but I see why this is special.
> -----Original Message-----
> From: Ian Hickson [mailto:ian at hixie.ch]
> Sent: 21. august 2013 01:34
> To: Sigurd Lerstad
> Cc: help at whatwg.org
> Subject: Re: [html5] HTML5 canvas.toDataURL suggestions
> On Sat, 18 May 2013, Sigurd Lerstad wrote:
> > I suggest improving / making more flexible the canvas.toDataURL API
> > The API is currently called with a second quality argument for the
> > JPEG and WebP formats, and no second argument for the PNG format:
> > toDataURL(type, quality); // JPEG and WebP
> > toDataURL(type); // PNG
> > I suggest the following possibilities as well:
> > grayscale: true/false, // since the JPEG format also
> > supports grayscale images at smaller files sizes
> What's the use case?
> > progressive: true/false
> What's the use case for controlling this?
> To be perfectly honest, I don't really understand why we'd want to expose
> a lossy format at all. It seems better to get the whole data to the server,
> and then let the server do whatever it needs to do (convert to JPEG, etc)
> for long-term use of the data.
> > interlaced: true/false,
> > grayscale: true/false,
> > alpha: true/false,
> > Some means of creating 8bit color indexed PNG would also be nice.
> Nice for what? I don't really understand the use cases here.
> Ian Hickson U+1047E )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
> Help mailing list
> Help at lists.whatwg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help