Programmaticaly trigger a screenshot #251
-
Hi, How I get a screenshot programmaticaly. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
This would require:
I definitely want to make this possible in the future, I just need to make sure the API is right/safe. |
Beta Was this translation helpful? Give feedback.
-
The I may add some helper methods for saving screenshots in the future, but this should give you enough functionality to get started, at least. |
Beta Was this translation helpful? Give feedback.
The
main
branch now has support for turning aTexture
/Canvas
into anImageData
via aget_data
method, and you can retrieve the generated RGBA data viaImageData::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.