Skip to content

Screenshot saved as img? #10

Answered by MarcusWichelmann
Ovi-bear asked this question in Q&A
Discussion options

You must be logged in to vote

You could implement a custom render target that takes the received framebuffers and writes each frame as JPEG/PNG to the disk. If you need only one frame, you could close the connection right after that.
Please check out https://github.com/MarcusWichelmann/MarcusW.VncClient#manual-integration and as a reference implementation: https://github.com/MarcusWichelmann/MarcusW.VncClient/blob/master/src/MarcusW.VncClient.Avalonia/RfbRenderTarget.cs

This approach should even work in console applications, no UI framework required.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MarcusWichelmann
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
Converted from issue

This discussion was converted from issue #9 on October 20, 2021 06:19.