* @param file The file to be processed.
*/
public void processFile(File file) {
try {
log("Processing File: " + file.getAbsolutePath());
FileSeekableStream input = new FileSeekableStream(file);
PlanarImage image = JAI.create("stream", input);
for (int i = 0; i < instructions.size(); i++) {
Object instr = instructions.elementAt(i);
if (instr instanceof TransformOperation) {
image = ((TransformOperation) instr)
.executeTransformOperation(image);
} else {
log("Not a TransformOperation: " + instr);
}
}
input.close();
if (str_encoding.toLowerCase().equals("jpg")) {
str_encoding = "JPEG";
} else if (str_encoding.toLowerCase().equals("tif")) {
str_encoding = "TIFF";