Alex Rivera | Logout

Uploading 'canvas' image data to the server

Asked 2009-10-19T20:31:06.933
41

I need to upload the canvas image data to the server (database) on the fly, i.e., I need to create a form and with an input=file, and post the image data without any user interaction.

Edit
Report

1 Answer

11

You don't need a file input, just get the data with ctx.getImageData() and post it to the server with Ajax.

See the MDN Documentation for CanvasRenderingContext2D.getImageData().

But you won't be able to get the image data in IE, even with ExCanvas.

answered 2009-10-19T20:38:55.440

Your Answer