[whatwg] Feature proposal - add method to CanvasRenderingContext2D

Hi,
the subject says it all. Details follows.

Description
add overload of (or add similarly called) method "createImageData" to
interface CanvasRenderingContext2D which would take two arguments:
- encodedImageBinaryData
- dataMimeType
which are rather self explanatory.

Reason
The reason is to be able to supply output of the future File API
standard (http://www.w3.org/TR/FileAPI/) into canvas.

Use case
Usually there is a lot of image processing during image upload. This
processing takes place at the server and it can consume a lot of
system resources. The method I propose would enable basic client side
image processing by loading image to canvas tag. Then the modified
image could be sent to server instead of the original one. This would
save a lot of server's resources and sometimes even a lot of
bandwidth.

Another possibilities
There are already solutions for this use case, but they are based on
technologies like Flash or Silverlight. With this proposal, no plugin
would be needed.

-- 
Franti?ek ?ez??
Prague, Czech Republic

Received on Wednesday, 3 March 2010 05:08:39 UTC