I am working with canvas and I would be able to save my Canvas to png.
By looking around, I discover the great toDataURL() function given by the W3C.
I am also already using the canvas2image from nihilogic that we can found on this page : http://www.nihilogic.dk/labs/canvas2image/
I noticed that on canvas2image, the developpers use the "image/octet-stream" which open the "open with" dialog box but give some problem :
-picture name is the ascii returned by toDataUrl().
-file extension is .part when downloaded
In short, I would prompt the "open with" dialog box with something like "myImage.png" when clicking on a button.
Is it possible ? Any help would be appreciated.
Edit : I have the contraint to use only Javascript, I can't use some nice PHP trick
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…