Oceansoul
April 8th, 2008, 08:47 AM
Hi there,
I got the following problem.
I created a small client-server architecture. The server reads images from a webcam. Now a client can open a connection to the server and request an actual image to be sent his way. So far this works all right. Only that, at the moment, I am using object streams to do that (sending an Image object).
But what Iīd like to do is converting the Image to a BufferedImage (which also works already) and then send the raw data via the network (Raster->DataBuffer). But I sincerely have now idea how to do that. How do I go about writing and reading such files/data?
I actually donīt know if that will be faster or better. Or if there is an even better way to do that.
Any help is greatly appreciated. I am pretty new to Java.
Oceansoul
I got the following problem.
I created a small client-server architecture. The server reads images from a webcam. Now a client can open a connection to the server and request an actual image to be sent his way. So far this works all right. Only that, at the moment, I am using object streams to do that (sending an Image object).
But what Iīd like to do is converting the Image to a BufferedImage (which also works already) and then send the raw data via the network (Raster->DataBuffer). But I sincerely have now idea how to do that. How do I go about writing and reading such files/data?
I actually donīt know if that will be faster or better. Or if there is an even better way to do that.
Any help is greatly appreciated. I am pretty new to Java.
Oceansoul