I tried a few methods here, and basically found that I'm not I/O limited (wrote to SSD and RAMDisk with similar times). I'm aware that there are tools/techniques for JPEG and PNG, such as:
JPEG - copy an input stream to FileOutputStream as done by PDFBox's ExtractImages
PNG - read/write a line at a time as done by PNGJ
Sometimes I will be extracting images from PDFs, so my flow will look like PDFBox's ExtractImages - this writes JPEGs very quickly. However the more general
ImageIOUtil.writeImage(image, suffix, out);
is quite slow for BufferedImages with very large dimensions.
I would actually start with a PDImage pdImage object before converting to BufferedImage (very memory usage heavy), if that makes a difference.