ICompress jp2 = new KduCompressExe();
if (alt != null)
jp2 = (ICompress) Class.forName(alt).newInstance();
if (new File(input).isDirectory() && new File(output).isDirectory()) {
ArrayList<File> files = IOUtils.getFileList(input, new SourceImageFileFilter(), false);
for (File f : files) {
long x = System.currentTimeMillis();
File outFile = new File(output, f.getName().substring(0, f.getName().indexOf(".")) + ".jp2");
compress(jp2, f.getAbsolutePath(), outFile.getAbsolutePath(), p);
report(f.getAbsolutePath(), x);