Please choose a menu option
Visit the IDRsolutions WebSite

Java JBIG2 Image decoder

The JPedal JBIG2 Image Decoder is a 100% pure Java image decoder for the JBIG2 file format. The decoder takes the JBIG2 image processing technology developed for the Java PDF viewer and makes it available as a generic library for more general usage.

It offers the ability to allow developers to add JBIG2 image rendering capabilities to their own applications, through a simple and easy to use API. In its simplest form it allows developers to load in a JBIG2 encoded datastream and convert that into a BufferedImage.

Version 1 is available under a BSD license to provide a JBig2 decoder. It is used in many projects, including some of our competitors.

Version 2 is a faster, enhanced version available under a commerical license only. It is used in the commercial versions of JPedal from 4.21 onwards.

 

JAI plug-in

The JPedal JBIG2 Image Decoder also acts as a plug-in for the ImageIO framework. Including the jbig2.jar on the classpath seamlessly enables the decoding of JBIG2 images with the single line:

BufferedImage biImage = ImageIO.read(new File("C:/file.jbig2"));

For a complete example using the JAI plug-in, a code example is included in:

 

Licensing

Version 1 is available under the BSD license. Support is available on a commercial basis.

 

Downloading the Decoder

The JPedal JBIG2 Image Decoder (version 1) is provided as a standalone jar file along with the source code.

Click here to download version 1 of the compiled jar.

Click here to download version 1 of the source code

Version 2 is only available from IDRsolutions on a commercial basis.

 

Running the Demo

The decoder can be run by double-clicking on the jar (if your machine is correctly setup) or using the command java -jar jbig2.jar from the command-line.

Both should bring up a demo window looking like this:

PDF viewer

 

Using the Decoder in your code

The library can used by adding the jar file to the classpath. A code example is included in:

 

 

Return to main PDF support section

Click here for the main PDF support area with lots of java examples, PDF tutorials and useful information to get the most out of the JPedal PDF library

 


PDF viewer