Three years ago, we introduced our own Java Image Library to tackle the problems we were facing with ImageIO and JAI. We were frustrated with the slow and memory intensive implementations, and having to write patches to fix JAI JPEG2000 bugs.
Since then JDeli has come a long way. Having our own image library has allowed us to create a much simpler and faster solution that avoids many of the issues we were finding with JAI and ImageIO, as well as add our own functionality.
In recent months we have:
1. Added support for more image file types
When we first released JDeli it only included support for 4 image file types. It now support more than 10 different image formats. Since the release of JDeli 7 last year we have added support for reading SGI, WMF and GIF files and writing BMP files. The full list of file types supported by JDeli can be found on our website.
2. Made speed improvements for JPEG and JPEG2000 images
We have increased efficiency so that less memory is used when handling both JPEG and JPEG2000 image formats. This has resulted in substantial speed improvements.
3. Added static read and write methods
We have added static read and write methods to make it very easy to replace ImageIO usage with JDeli. The read method can open files with the the extensions jpg, jpeg, jp2, jpx, dcm, png, webp, sgi, rgb, tiff, psd and bmp. The write method compresses a BufferedImage into a png, jpeg or tiff.
4. Carried out a big code review
Old methods have been tidied up and unneeded code has been removed to make a cleaner and simpler code base. This has also reduced our technical debt which will make it much easier to add new functionality.
5. Made use of Java 8 features.
The latest major release now makes use of features in Java 8 to improve speed and quality.
All of these enhancements are the reason behind updating the version number to 8. We have lots of ideas for new functionality to add to JDeli 8. You can read about some of the ideas we have in our 2018 JDeli roadmap.
Why use JDeli to read and write Images in Java?
JDeli offers a range of advantages over ImageIO and alternatives, including:
- prevent heap related JVM crashes
- support for additional image formats such as Heic
- reduce output file size
- improve read/write performance
- create smaller files
- control over output
- support threading
- superior image scaling algorithms
Read and write images in Java with one line of code
Read an Image with
BufferedImage image = JDeli.read(streamOrFile);
and write an Image with
JDeli.write(myBufferedImage, OutputFormat.HEIC, outputStreamOrFile)