I am simply trying to send a bufferedimage object from one computer to another using Netty.
I am really having a tough time with the decoder/encoder. Mainly getting the bytes from the bufferedimage, but I have a feeling that this may not be the right way to go about it. I was looking at ChannelBufferInput/OutputStreams.
Any help is appreciated,
Thank You
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
BufferedImage is not Serializable, so you'd have to roll the code by hand. The easiest approach might be to use the javax.imageio.ImageIO class to write the image in a lossless format -like PNG- to an OutputStream (which, I assume, the I/O layer can handle).
keith nope
Greenhorn
Joined: Jan 14, 2012
Posts: 2
posted
0
Thank you for the quick response!
write the image in a lossless format -like PNG-
Does this mean writing it to disk?
I've been poking around I found ObjectEncoder and ObjectDecoder, but I am starting to get very confused after looking at the different encoder/decoders.
I'm not sure how to implement this. I wish there was more example code