The Jai-imageio provides a useful plug-in for reading TIFF images via the Image I/O API but unfortunately, the project is not amenable to easy use in Maven projects. For this reason, I've published a small Maven project that cleanly exposes a pure Java implementation for reading and writing TIFFs.
To use the library simply include it as a regular Maven compile-scoped dependency, it uses jar services to automatically register itself as an Image I/O plugin.
<dependency> <groupId>com.tomgibara.imageio</groupId> <artifactId>imageio-tiff</artifactId> <version>1.0</version> </dependency>
To make the library jar available within your local repository you can either build it from source by checking it out from the Google Code with
svn checkout http://tomgibara.googlecode.com/svn/tags/imageio-plugins-1.0 imageio-plugins
and then executing
maven install on the
Or you can add the following repository to your project pom (or settings):
<repository> <id>tomgibara</id> <name>Tom Gibara Maven Repository</name> <layout>default</layout> <url>http://www.tomgibara.com/maven/repo/</url> <snapshots> <enabled>false</enabled> </snapshots> </repository>
With the correct Maven dependency properly established, loading a TIFF is as simple as:
BufferedImage image = ImageIO.read(tiffFile);
All project source code is released under a Sun modified MIT Licence as per the original source files.