[html5] HTML5 canvas.toDataURL suggestions
sigurd.lerstad at gmail.com
Sat May 18 02:49:53 PDT 2013
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
For the WebP format, as far as I can see, Chrome currently doesn't create an
Also, the possibility to create lossless WebP would be nice, I'm not sure if
specifying a value of 1 for quality, accomplishes this.
alphaQuality: 0..1 (same as quality if omitted)
For the PNG format:
Some means of creating 8bit color indexed PNG would also be nice.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help