This content has been marked as final. Show 3 replies
Check out this thread. I had a similar problem awhile back, and that thread has pretty much everything you'd need to know about working with byte image streams. Although my problem was not exactly what yours is, I know the answer to your problem lies in that thread. Read it over a bit, and check out the links provided.
In fact, this seems to be what you need:
This gives you a BufferedImage, image, that you can then write as a jpeg image.
byte buffer = getImage(); //whatever you use to retrieve the byte JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer)); BufferedImage image =decoder.decodeAsBufferedImage()
Message was edited by: