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

Export render as image #221

Open
sunjay opened this issue Feb 24, 2019 · 1 comment
Open

Export render as image #221

sunjay opened this issue Feb 24, 2019 · 1 comment

Comments

@sunjay
Copy link
Contributor

sunjay commented Feb 24, 2019

Really excited to get to use this crate on some projects!

Do you think it would be possible to add the ability to export the rendered image as a PNG file (with transparency)? This would involve rendering to an image rather than the screen.

This is useful for debugging, screenshots, and many other use cases. I tried looking around in the documentation and in the issue tracker but couldn't see anywhere that indicated if this was possible or not.

If it needs to be implemented and you provide some instructions to help get this started, I or someone else interested may be able to help out. :)

@kvark
Copy link
Collaborator

kvark commented Feb 25, 2019

It could be as straightforward as Window::take_screenshot method. One would implement it based on gfx-rs example code: https://github.com/gfx-rs/gfx/blob/93de8916740a1075909cd4b7cd83f668fe454c99/examples/gamma/main.rs#L129-L164

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

No branches or pull requests

2 participants