The ImageIO class provides utility classes for both read and writing images. To write your image to an output stream you would can use the write method telling it what format you want to write the image in, eg. JPEG, PNG.
ImageIO.write(image, "PNG", out);
2 Responses to “How do I write a BufferedImage to an output stream?”
Leave a Reply
You must be logged in to post a comment.