Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Are you a Java Developer working with Image files?

Read and write images in Java with JDeli

Why we wrote our own Java JPEG2000 libraries

55 sec read

JPEG2000 icon

What is JPEG2000?

JPEG2000 icon

JPEG2000 is an important image file format which offers significant benefits over JPEG. For our specific usage it does generate significantly smaller file sizes for images which is critical for many of our customers.

What solutions already exist?

There are already a couple of JPEG libraries available for Java. The most well-known is ImageIO which can read and write JPEG images. There is also an Open-source library called jj2000. Both of these have good basic support for RGB images, but work less well on other Colorspaces (CMYK, YCCK, etc).

What is wrong with the current solutions?

However, they are not complete implementations, for example lacking features such as ROI (Region Of Interest). They need a lot of memory and have a number of irritating bugs. We have written up some of these under a previous blog post ‘Fixing bugs in Java JPEG2000‘.

When writing JPedal (our Java PDF library), these are critical concerns. PDF data is often in non-RGB colorspace and the data is from many different tools.

We also felt that starting afresh with Java 8 would make it easier to write and develop a compact library. Indeed, the JDeli JPEG2000 Decoder is generally twice the speed of JAI and uses significantly less memory than jj2000.

So if you are looking for a free JPEG2000 library for Java and working with just RGB images, we can recommend ImageIO and jj2000 as excellent tools (at least as a starting point). If you need a heavy duty commercial JPEG2000 Decoder/Encoder we hope you will evaluate JDeli.



Find out how to read and write images files in Java with JDeli:

Read: BufferedImage image = JDeli.read(streamOrFile);

Write: JDeli.write(myBufferedImage, OutputFormat.HEIC, outputStreamOrFile)

Learn more >>

Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.