/** * Writes a {@link BufferedImage} to an output stream in JPEG format. * * @param out the output stream (<code>null</code> not permitted). * @param image the image (<code>null</code> not permitted). * * @throws IOException if there are any I/O errors. */ public static void writeBufferedImageAsJPEG(OutputStream out, BufferedImage image) throws IOException { // defer argument checking... writeBufferedImageAsJPEG(out, 0.75f, image); }