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.
+1
A:
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?
Barry Kelly
2008-12-09 02:23:17
A:
How would I convert the bitmap though? The send function requires a const char* and I have the bitmap stored in a BITMAP. Also how would I convert back? Thanks for the help, I am new to c++.
I suggest you ask again with more specific questions, such as: "Using C++ on Windows, how do I save a bitmap to a char buffer?", etc. Include any frameworks you are using, like ATL, WTL, MFC, etc., or if you just want raw SDK calls. Just asking "send bitmap with winsock" is far too vague.
Barry Kelly
2008-12-09 04:44:35
Ok, I will next time.
2009-08-13 21:09:34