We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can it be possible to have a screenshot of the displayed image?
maybe even offscreen?
The text was updated successfully, but these errors were encountered:
hello,
I'm not sure what screen you want to capture, but if you want to capture the rendered screen, you can do so using the code below.
private unsafe void CopyScreenToTexture_And_SaveToFile(string fileName) { int size = renderer.Width * renderer.Height*4; byte[] buffers = new byte[size]; fixed (byte* p = buffers) { GL.ReadPixels(0, 0, renderer.Width, renderer.Height, All.BgraImg, All.UnsignedByte, (IntPtr)p); } SKBitmap bitmap = new SKBitmap(renderer.Width, renderer.Height); using (var image = SKImage.FromBitmap(buffers.ToSKBitMap(renderer.Width, renderer.Height))) using (var data = image.Encode(SKEncodedImageFormat.Jpeg, 100)) using (var stream = File.OpenWrite("screencapture.jpg")) { data.SaveTo(stream); } }
Sorry, something went wrong.
@hjoykim
Is there a mirror?
No branches or pull requests
how can it be possible to have a screenshot of the displayed image?
maybe even offscreen?
The text was updated successfully, but these errors were encountered: