Created
May 10, 2013 22:53
-
-
Save meltingice/5558028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script type="text/javascript"> | |
var ready = false; | |
var caman = Caman('#example', 'EdielOficial.JPG', function () { | |
this.render(function () { | |
ready = true; | |
//this.save('png'); // shows a download file prompt | |
}); | |
}); | |
document.findElementById('save').onclick = function () { | |
if (!ready) return false; | |
caman.save(); | |
}; | |
</script> | |
</head> | |
<body> | |
<div id="Content"> | |
<img | |
id="example" | |
src="EdielOficial.JPG" | |
> | |
<a id="save">Salvar</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for your help. But the code does not return the desired value. What I want to do is save the image after changed. To this end user would click a button "SAVE" and the image should be saved in an address on the server. Its you help me with this code?
grateful