Skip to content

Is it possible to access frame buffer from cs-script? #403

Answered by A-tG
A-tG asked this question in Q&A
Discussion options

You must be logged in to vote

Made it https://github.com/A-tG/mpv.net-scripts/blob/main/scripts-cs/screenshot-to-clipboard.cs https://github.com/A-tG/mpv.net-ScriptsExtension/blob/main/AtgScriptsExtension/ScreenshotToClipboardScript.cs
Quite ugly code. SetPixel() in a loop is very slow, and the whole thing probably can be optimized with usnafe code and allocating structures with stackalloc instead of AllocHGlobal()

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@A-tG
Comment options

Comment options

You must be logged in to vote
1 reply
@stax76
Comment options

Answer selected by A-tG
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