public void processFile(String inputDirectory, String inputFileName, String outputDirectory)
{
File file = new File(inputDirectory, inputFileName);
String name = file.getAbsolutePath();
System.out.print(name);
PixelImage image;
try
{
if (useToolkit)
{
image = ToolkitLoader.loadViaToolkitOrCodecs(name, true, null);
}
else
{
image = ImageLoader.load(name);
}
}
catch (Exception e)
{
image = null;
}
if (image == null)
{
numFailed++;
System.out.println(" Failed.");
}
else
{
numSuccess++;
System.out.println(" OK. Width=" + image.getWidth() + ", height=" + image.getHeight() + " pixels.");
}
}