Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Associate dataURL to an image variable #1064

Open
rachits123 opened this issue Jul 31, 2015 · 0 comments
Open

Associate dataURL to an image variable #1064

rachits123 opened this issue Jul 31, 2015 · 0 comments

Comments

@rachits123
Copy link

Hello sir,

i am using Kinetic.js to create a dynamic image with random shapes

This works fine

Later, i want to save that data generated to a image variable in a way similar to this:
img = canvas.toDataURL()

i tried to do

var image
stage.toDataURL({
callback: function(dataUrl) {
kineticdataURL = dataUrl;

image= dataURL.toDataURL

or

image =kineticdataURL

window.open(image) // i am able to see the image generated

}
});
window.open(image); // i am unable to see the image generated outside the stage.toDataURL()

all that i get is a blank screen.

Please help !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant