1

i'm using imageFx javascript library and it's really wonderful i'm just wondering is their any way to send the processed image back to the server after being processed for saving ? i'm using asp.net c#

http://www.nihilogic.dk/labs/imagefx/
loler
  • 2,594
  • 1
  • 20
  • 30
Sora
  • 2,465
  • 18
  • 73
  • 146
  • Hi, get the image data with: var Pic = document.getElementById("myCanvas").toDataURL("image/png"); and then send it with ajax to the c# server. here's a full tutorial : http://www.codicode.com/art/upload_and_save_a_canvas_image_to_the_server.aspx – Chtioui Malek Nov 16 '12 at 07:18

1 Answers1

1

It looks like this uses a 2D canvas to process the image you should be able to find the canvas in the DOM using Javascript and then send the canvas data as an image to the server.

Using something like (assuming jQuery is present):

$.post('/upload',
        {
            uid : uid,
            img : canvas.toDataURL('image/jpeg')
        },
        function(data) {});

This will send it as base64 encoded image data, you can then decode that and store the resulting image on the server.

That process is discussed here: Uploading 'canvas' image data to the server

Community
  • 1
  • 1
Steve Temple
  • 2,238
  • 19
  • 27