Results 1 to 3 of 3
- 09-09-2009, 02:14 PM #1
Member
- Join Date
- Sep 2009
- Posts
- 2
- Rep Power
- 0
socket communication between c++/java and sending image
hi,
i have a class in c++ called win32_sockserver which creates socket to java. i am trying to send image c++ to java and using the most basic method. i am sending image's rgb values as a string. But i have a problem:
i want to send images continuosly, like frames of video. how can i do this.
secondly, is there an easy way of sending images through c++ to java ?
- 09-09-2009, 04:45 PM #2
"i have a class in c++ called win32_sockserver which creates socket to java. i am trying to send image c++ to java and using the most basic method. i am sending image's rgb values as a string. But i have a problem:"
Does that mean you have something that works for one image?
"secondly, is there an easy way of sending images through c++ to java ?"
No. The fact that one end of the pipe is c++ and the other is java doesn't particular matter, you are just sending bytes from one place to the other. What is difficult is figuring out what those bytes mean on the other side.
When you say you send as a c++ string, what is that you mean: a c++ string object or a char[] with or without a '\n' at the end of it?
What is your plan in taking these bytes and forming an image out of it when you get to the java side? Are you going to draw it by hand using the rgb values or do you plan to write it to a file as a jpg or some other file format?
"i want to send images continuosly, like frames of video."
The question i would ask is... how do you plan to compress your data?Last edited by mrmatt1111; 09-09-2009 at 06:39 PM.
My Hobby Project: LegacyClone
- 09-10-2009, 02:29 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 2
- Rep Power
- 0
in c++ side, i use open cv and after getting every pixel's rgb values, it sends them in char[]. there is no delimiter, but i can.
code i written is very primitive, it doesnt use any compession method, only sends rgb values, but speed is sufficient for me.
in java side, after getting rgb values, by using MemoryImageSource class, i am loading rgb values to class using pixel[].
Similar Threads
-
Socket Communication on different networks
By ersachinjain in forum NetworkingReplies: 4Last Post: 09-05-2009, 02:32 AM -
Sending a file through socket
By sureshkumarcs88 in forum NetworkingReplies: 2Last Post: 03-14-2009, 07:32 AM -
problem in socket connection in sending images
By vibhor in forum NetworkingReplies: 2Last Post: 02-20-2009, 05:39 AM -
Sending a .Doc file from client to a server through socket
By amita_k29 in forum NetworkingReplies: 1Last Post: 02-10-2009, 09:16 AM -
Sending Image Objects through the Clipboard
By Java Tip in forum java.awt.datatransferReplies: 0Last Post: 04-16-2008, 10:52 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks