Export canvas to PNG - image cannot be displayed

2013-02-12 Thread membersound
I'm exporting a canvas content as String to a servlet, to generate downloadable file. But the resulting file is not viewable. What could I be missing Send to servlet: String content = canvas.toDataUrl(image/png); Servlet handling: response.setHeader(Content-Disposition, attachment;

Re: Export canvas to PNG - image cannot be displayed

2013-02-12 Thread Jens
If you want to download the real image I guess you have to strip off data:image/png;base64, and then decode the base64 string to get the image data as byte array. Then you write the byte array to your servlets output stream. -- J. -- You received this message because you are subscribed to