Sign in to follow this  

Send screenshots over the internet.

This topic is 4749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I need to send scerenshots every second or so, through directplay. This requires me to have the size of the screenshot in bytes.. I have no clue how to get this. (I am using visual basic, I needed to make this quickly, not well.) Can you tell me how you could find the size of the screenshot? Assume the pictuer is already on the clipboard. Thanks. ~Adams555~

Share this post


Link to post
Share on other sites
Hello,

For windows uncompressed DIBs this is really height * ((width+3)&(~3)) * bitcount / 8

Converted to human (nearly) readable:

linepadding = (width + 3) and not 3
imgsize = height * linepadding * bitcount / 8

if width is a multiple of 4 then linepadding = width (using the same formula).

Be aware that if you are taking screeshots of 1600x1200x24bpp screens, this will create 5.7MiB images. Not so easy to send them over the internet every second.

HTH,

Share this post


Link to post
Share on other sites
As you haven't mentioned what you are doing this for, may I suggest that you may wish to take a look at a using VNC Viewer compatible program. For example TridaVNC. It is for remote control from another PC. (even cross platform!)
The reason I suggest this is that sending the entire screen image is pretty much only used for the reason of remote desktop type of stuff.

Who knows, you may even find source code for such a viewer out there. I imagine that the protocol is at least available somewhere which may give you ideas.

I have no idea how to get the size of the clipboard data from visual basic. It seems odd to me that your screen image is on the clipboard to begin with though.

Share this post


Link to post
Share on other sites

This topic is 4749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this