I've got an Applet that you can paste an image into on the client browser, and I've got IP Sockets communication with the server working, but how do you send the Image over the Socket stream?
Thanks much, Jon
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Welcome to JavaRanch.
A java.awt.Image object can't be sent over the wire, so you'll need to send the array of pixels instead, e.g. by serializing it. Getting the pixels would require the use of java.awt.image.PixelGrabber in the applet, and reconstructing the image on the server (if that's necessary) would involve java.awt.image.MemoryImageSource.