Image Writing
JDeli includes several image writers which take in a BufferedImage and allow you to write it out as a wide range of file formats. We have some simple code examples showing how to export to different image file formats from Java code. Just copy and paste into your code.
Getting started (Using PNG as an example):
//Methods to emulate how ImageIO works
JDeli.write(myBufferedImage, "png", outputStream);
JDeli.write(myBufferedImage, "png", new File(fileName));
byte[] outputData = JDeli.write(myBufferedImage, "png");
// New method for quick and simple usage
JDeli.write(myBufferedImage, OutputFormat.PNG, outputStream);
JDeli.write(myBufferedImage, OutputFormat.PNG, new File(fileName));
byte[] outputData = JDeli.write(myBufferedImage, OutputFormat.PNG);
JDeli contains additional write methods which allow exact control over output options for each image format.
Currently, we support the following formats: