user37875
user37875

Reputation: 14214

send bitmap with winsock

How could you send a bitmap over winsock without saving it to a file then sending that? It would also be helpful if you knew how to convert the data after being recieved back into a bitmap.

Upvotes: 2

Views: 1132

Answers (1)

Barry Kelly
Barry Kelly

Reputation: 42152

What programming language are you using?

Basically, you've got to store the bitmap data into some kind of byte buffer, then send the bytes over the wire, and read the bitmap back out of the byte buffer at the other end.

As such, there are four tasks:

  • Save bitmap to buffer
  • Write data across wire using a socket
  • Read data from wire using a socket
  • Load a bitmap from a buffer

Which tasks in particular are you not clear about?

Upvotes: 1

Related Questions