Jump to content

Save HTML5 Canvas to my user's drive w/ current file format and quality


TonyC

Recommended Posts

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 

Edited by TonyC
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...