JAI is platform dependent and today seems like a dead project.
I recommend using the open source imagemagick program . Although platform dependent, it is available for the same platforms as JAI, but with full community support.
The focus on large images about imagemagick uses its stream "command instead of convert . Stream only reads the corresponding part of the image and saves the extracted part as raw data. Then you need to" convert "to save small raw data as jpeg.
An example of saving a tile from large.jpeg of size 800x600 from position 0x0 to tile.jpeg:
stream -extract 800x600+0+0 large.jpeg tile.rgb convert -depth 8 -size 800x600 rgb:tile.rgb tile.jpeg
(When working on Windows, be sure to use ImageMagick convert.exe, as there is a windows command called "convert".)
When working only with TIFF images, apache Sanselan might be the right choice - this is a pure-java image library. Additionally, the JAI seems to contain a platform-independent codec for TIFF.
source share