C#/Java + PrintScreen + Network

ghidu

Senior member
Feb 28, 2005
331
0
0
I'm trying to write a program (in C#, but I can work in Java too) that takes (frequently) printscreens and sends them to another computer.
Right now, it needs 2-3 secs to process the printscreen(800x600) (I'm sending only the changes from previous screenshot) and it's too slow. What I do is run through the entire bitmap (2 for loops) and check every pixel. I know there is a better way since VNC does is very fast.
Is there a way to make the entire process faster?
Thanks in advance
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
That's because VNC hooks into gui windows so it knows when it moves/changes/refreshes or whatever it needs. It doesn't take a bunch of screenshots.

A raw BMP at 800x600x32 is roughly 15MB of data, which is quite a bit to be processing in realtime across a network share without some optimized routines.

Check out http://old.realvnc.com/howitworks.html for some basic information. I believe the VNC spec is open as well.
 

ghidu

Senior member
Feb 28, 2005
331
0
0
Update: I didn't find a way to work with the framebuffer in C#, but I managed to find a way to use unsafe code to get faster response: ~1 sec. I guess it will have to do. Anyway I would have scan the entire image (from the framebuffer) for changes.