//--------------------------------------------------------------------------
private Image getTiffImage(String inFile) throws IOException {
FileInputStream fileInputStream = null;
try {
Tiff t = new Tiff();
fileInputStream = new FileInputStream(inFile);
t.readInputStream(fileInputStream);
if (t.getPageCount() == 0)
throw new IOException("No images inside TIFF file");
return t.getImage(0);
} finally {
IOUtils.closeQuietly(fileInputStream);
}
}