Permalink
Browse files

Allow alternate test image in BaseApiTester.

If an argument is specified, it will now be used as the path to the test
image.
  • Loading branch information...
Tyler Austen Tyler Austen
Tyler Austen authored and Tyler Austen committed Mar 9, 2013
1 parent 32c5223 commit 9c9626dc3f9573a0b3dedfa16f40b7bd75a29ae0
Showing with 6 additions and 1 deletion.
  1. +6 −1 BaseApiTester/Program.cs
View
@@ -13,11 +13,16 @@ class Program
{
public static void Main(string[] args)
{
+ var testImagePath = "./phototest.tif";
+ if (args.Length > 0) {
+ testImagePath = args[0];
+ }
+
try {
var logger = new FormattedConsoleLogger();
var resultPrinter = new ResultPrinter(logger);
using (var engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.Default)) {
- using (var img = Pix.LoadFromFile("./phototest.tif")) {
+ using (var img = Pix.LoadFromFile(testImagePath)) {
using (logger.Begin("Process image")) {
var i = 1;
using (var page = engine.Process(img)) {

0 comments on commit 9c9626d

Please sign in to comment.