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

Can not export the modified image #24

Open
glumb opened this issue Dec 27, 2014 · 4 comments
Open

Can not export the modified image #24

glumb opened this issue Dec 27, 2014 · 4 comments

Comments

@glumb
Copy link

glumb commented Dec 27, 2014

I'm trying to export an image from the canvas using canvas.toDataURL(). This does not work for me on Chrome nor Firefox. Also the 'canvas.toDataURL.html' test does not show a second exported image.

How to export or save a screenshot of the canvas the right way?

@glumb
Copy link
Author

glumb commented Dec 28, 2014

I discovered, that it works, if we use the toDataUrl method which was removed in a8a03b4

@stuarteaton
Copy link

Can you give an example of how you got this to work. I am struggling to export the canvas to an image.

@glumb
Copy link
Author

glumb commented Jul 6, 2015

Hey @stuarteaton,
add the method a8a03b4 back to the source and try something like this:

that.renderingCanvas = fx.canvas();
that.renderingCanvas.draw(texture).perspective( //or any other transform
                    [0, 0, w, 0, 0, h, w, h],
                    points
                ).update();
that.renderingCanvas.toDataURL()

@Dineshruhela
Copy link

Hi @glumb,
I am also facing the same issue and I'm using npm package of glfx.js with react where exactly should I add metthod back to the source
that.renderingCanvas = fx.canvas(); that.renderingCanvas.draw(texture).perspective( //or any other transform [0, 0, w, 0, 0, h, w, h], points ).update(); that.renderingCanvas.toDataURL()

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

3 participants