[whatwg] Feature proposal - add method to CanvasRenderingContext2D

František Řezáč frantisek.rezac at calavera.info
Wed Mar 3 05:08:39 PST 2010


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


More information about the whatwg mailing list