Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Bitmap using Sockets ??

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hey All.
I'm having a problem sending TBitmaps using TServer/TClient-Sockets.

I have tried using : Socket->SendBuf(bmp,sizeof(*bmp));
but the size of the fullscreen bitmap bmp, seems to be only 56 bytes ????
I you have any idea of what i´m doing wrong please write.
kind regards
Klaus Grønbæk Denmark.
 
send small portions of the buffer. Ion Filipski
1c.bmp


filipski@excite.com
 
The class TBitmap does not contain the Btmap data itself, but only the handle to the image which is stored anywhere in the memory.

Perhaps you can use the method "Writetostream" for your purposes. But i never tried this. if you succeed, please post the solution here.

hnd
hasso55@yahoo.com

 
yes, but you can send the a file or a diagram. Is up to you to choose the right method. Ion Filipski
1c.bmp


filipski@excite.com
 
Hey Guys.
I forgot my original login so I used qwert+++ before.
Have you got any idea of wicht desendent of the TStream to use, I tried to create an instance of TwinSocketStream, but i counldn't create one using new TWinSocketStream.
The I tried using TMemoryStream, I used bmp->SaveToStream( TStream* S), but the size of the stream of the fullsize screenshot was only 40 bytes ?? Do any of you guys know how to get a handle to the actual bitmap, ( The TBitmap* contains the bitmap and the pallet right ?).
Tnx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top