Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
How to transfer image between two windows application using TCP connection.Pls help me.Thanks in advance.
Posted
Comments
Zoltán Zörgő 16-Feb-13 13:44pm    
What have you done already?
Logi Guna 16-Feb-13 13:52pm    
Please do not repeat your question. I already answer your question:
http://www.codeproject.com/Answers/545035/Iplushaveplustwoplusformsplushowplustoplussendplus#answer1

Can you tell where are you stuck?

1 solution

1) Create a socket based clien-server architecture like in the following sample: http://www.dodgycoder.net/2012/08/tcpip-sockets-in-net-4.html[^]
2) As you see, there is a stream to write and one to read. You can serialize any image to a stream:
C#
Image im = Image.FromFile(@"c:\image.jpg");
MemoryStream ms = new MemoryStream();
im.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); 

Likewise you can create an image FromStream[^] at the other end.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Feb-13 19:41pm    
Some basic ideas. My 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900