Skip to content

Programmaticaly trigger a screenshot #251

Answered by 17cupsofcoffee
Datoh asked this question in Q&A
Discussion options

You must be logged in to vote

The main branch now has support for turning a Texture/Canvas into an ImageData via a get_data method, and you can retrieve the generated RGBA data via ImageData::into_rgba8. API subject to change based on feedback/how I feel about it when I'm less tired 😄

I may add some helper methods for saving screenshots in the future, but this should give you enough functionality to get started, at least.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@Datoh
Comment options

@Datoh
Comment options

@17cupsofcoffee
Comment options

Comment options

You must be logged in to vote
2 replies
@Datoh
Comment options

@17cupsofcoffee
Comment options

Answer selected by 17cupsofcoffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants