Jump to content

Sending Image with TCP


Recommended Posts

I know I can send an image (jpg) over TCP, I can do that already. I can also capture the screen with _ScreenCapture_Capture and send that over TCP. My problem is that, at the moment, I have to save the screenshot on the remote computer, then send the file, then save the file on the computer with the server. All this to put the screenshot on a gui as a pic control.

I was wondering if I could use _ScreenCapture_Capture("") and send the data in binary, and form it into a jpg on the next computer that received the binary data. The reason for me doing this is for speed. I have the tcp network set up as well as the loop to send a file or binary data to a server. All I need is to know how the return from _ScreenCapture_Capture("") is formatted and how to convert that into binary. Then, if I use fileopen($File, 16 + 2) and write the binary data to the file, I will have a jpg. Thanks in advance.

Link to comment
Share on other sites

save to the TempDir?

Link to comment
Share on other sites

I could do that, but I would still have to save the file many times. I was hoping I could just convert the return value of _ScreenCapture_Capture("") into binary, send that through TCP, then create the file on the other side of the TCP network. Can _ScreenCapture_Capture("") be converted into binary. The return value is a handle.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...