Skip to content

Commit

Permalink
Allow alternate test image in BaseApiTester.
Browse files Browse the repository at this point in the history
If an argument is specified, it will now be used as the path to the test
image.
  • Loading branch information
Tyler Austen authored and Tyler Austen committed Mar 9, 2013
1 parent 32c5223 commit 9c9626d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion BaseApiTester/Program.cs
Expand Up @@ -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)) {
Expand Down

0 comments on commit 9c9626d

Please sign in to comment.