teratosis Posted October 9, 2013 Share Posted October 9, 2013 Hey there, I made this color swatch http://www.musiccomputing.info/newMike/selectMike.html. I would like to add a button for the user to be able save their image configuration. How would I go about this? Thank you. Link to comment Share on other sites More sharing options...
thescientist Posted October 9, 2013 Share Posted October 9, 2013 You would have to persist their selection somehow, which is saving whatever data is meaningful in order to recreate it on the page and then mapping that configuration with to that user. One way would be with a database that allows a user to login and then you can save their data and recall it when they log back in next. Link to comment Share on other sites More sharing options...
davej Posted October 9, 2013 Share Posted October 9, 2013 (edited) Or, for temporary storage you might save it in a cookie... http://www.w3schools.com/js/js_cookies.asp Edited October 9, 2013 by davej Link to comment Share on other sites More sharing options...
teratosis Posted October 9, 2013 Author Share Posted October 9, 2013 What about save to desktop (jpeg or png)? Link to comment Share on other sites More sharing options...
Ingolme Posted October 9, 2013 Share Posted October 9, 2013 You'll have to rebuild your program using the HTML 5 canvas element if you want to be able to save the result as an image. Link to comment Share on other sites More sharing options...
teratosis Posted October 9, 2013 Author Share Posted October 9, 2013 You'll have to rebuild your program using the HTML 5 canvas element if you want to be able to save the result as an image. Looks like that is more for drawing? Link to comment Share on other sites More sharing options...
Ingolme Posted October 9, 2013 Share Posted October 9, 2013 Canvas is for anything that you want to save in an image format, aside from other uses. Link to comment Share on other sites More sharing options...
davej Posted October 9, 2013 Share Posted October 9, 2013 A right-click save or a popup file save? Does this get us back to the hidden iframe topic? Link to comment Share on other sites More sharing options...
teratosis Posted October 9, 2013 Author Share Posted October 9, 2013 So before HTML5, you guys are saying it was impossible to save an image in the manner I described? Link to comment Share on other sites More sharing options...
davej Posted October 9, 2013 Share Posted October 9, 2013 You have three images and you want to combine them into one image file, right? Link to comment Share on other sites More sharing options...
teratosis Posted October 9, 2013 Author Share Posted October 9, 2013 Gotcha lol. Say no more, I will go back to the drawing board. And learn canvas. Link to comment Share on other sites More sharing options...
Ingolme Posted October 9, 2013 Share Posted October 9, 2013 Before HTML 5 it was impossible to do with Javascript. With PHP's GD library you could build a program that did it on the server-side. Link to comment Share on other sites More sharing options...
davej Posted October 11, 2013 Share Posted October 11, 2013 Can Javascript cause the browser to open a save-file dialog or can that only be accomplished if the server tells the browser it has a file to send? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now