I should specify in advance "Using pure JavaScript: I'm working on bare-bones HTML5 / CSS3 / JavaScript image editor and I'm ready to add a fileSave function. I'm going to use toDataURL() to allow the user to
(1) save the file with a new JPG quality setting, or
(2) save the file to PNG (I'm not aware of any options for PNG), or
(3) save the current file format (typically JPG) and current quality setting.
This last option will basically be the same thing as "right click" and "save file", but I would prefer something that will work from a button.
How would I go about doing this? A code sample would definitely be helpful
Thank you