Improved the statistics reporting for the CommandLineRunner.

git-svn-id: https://zxing.googlecode.com/svn/trunk@333 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2008-04-01 18:30:38 +00:00
parent 14a200b546
commit 410b5b4e92

View file

@ -44,12 +44,15 @@ public final class CommandLineRunner {
if (inputFile.exists()) {
if (inputFile.isDirectory()) {
int successful = 0;
int total = 0;
for (File input : inputFile.listFiles()) {
if (decode(input.toURI())) {
successful++;
}
total++;
}
System.out.println("Decoded " + successful + " files successfully");
System.out.println("\nDecoded " + successful + " files out of " + total +
" successfully (" + (successful * 100 / total) + "%)");
} else {
decode(inputFile.toURI());
}
@ -77,16 +80,4 @@ public final class CommandLineRunner {
}
}
/*
public BufferedImage toBufferedImage() {
BufferedImage image = new BufferedImage(dimension, dimension, BufferedImage.TYPE_BYTE_BINARY);
for (int j = 0; j < dimension; j++) {
for (int i = 0; i < dimension; i++) {
image.setRGB(j, i, get(i, j) ? 0x00000000 : 0x00FFFFFF);
}
}
return image;
}
*/
}