Screenshot saved as img? #10
-
how I capture screenshot and save it as image? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. This approach should even work in console applications, no UI framework required. |
Beta Was this translation helpful? Give feedback.
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.