Open EloiStree opened 3 years ago
The main topic that send on large range of topic:
// Making fullscreen screenshot
public static Bitmap makeScreenshot()
{
Bitmap screenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
Graphics gfxScreenshot = Graphics.FromImage(screenshot);
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
gfxScreenshot.Dispose();
return screenshot;
}
I need to convert the screen(s) to Texture2D in unity to be able to make pixel condition and shadergraph filtering to improve the toolbox OMI. You can use the classic C# and user32 dll to copy the screen but it often crash and is very very slow 400-1000 milliseconds. I use also a java version that take 100-600 ms.
I need something more smooth. Because of performance but also because I would like to create my own virtual desktop version in Unity in an open source way in the future to make working environment.
So apparently they are ways of doing it. But that in skills I don't own. So let's learn new skills.