diff --git a/Products/TesseractOCR.framework/Versions/A/Headers/Tesseract.h b/Products/TesseractOCR.framework/Versions/A/Headers/Tesseract.h index f3182815..883c9f00 100755 --- a/Products/TesseractOCR.framework/Versions/A/Headers/Tesseract.h +++ b/Products/TesseractOCR.framework/Versions/A/Headers/Tesseract.h @@ -13,6 +13,7 @@ @protocol TesseractDelegate @optional +- (void)progressImageRecognitionForTesseract:(Tesseract*)tesseract; - (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract; @end diff --git a/Products/TesseractOCR.framework/Versions/A/Resources/Info.plist b/Products/TesseractOCR.framework/Versions/A/Resources/Info.plist index 04baaf17..ed9a209a 100644 Binary files a/Products/TesseractOCR.framework/Versions/A/Resources/Info.plist and b/Products/TesseractOCR.framework/Versions/A/Resources/Info.plist differ diff --git a/Products/TesseractOCR.framework/Versions/A/TesseractOCR b/Products/TesseractOCR.framework/Versions/A/TesseractOCR index f804f14c..ffbd6769 100644 Binary files a/Products/TesseractOCR.framework/Versions/A/TesseractOCR and b/Products/TesseractOCR.framework/Versions/A/TesseractOCR differ diff --git a/Template Framework Project/Template Framework Project/G8ViewController.m b/Template Framework Project/Template Framework Project/G8ViewController.m index 93ed84c8..984b802d 100644 --- a/Template Framework Project/Template Framework Project/G8ViewController.m +++ b/Template Framework Project/Template Framework Project/G8ViewController.m @@ -77,6 +77,13 @@ -(void)recognizeImageWithTesseract:(UIImage *)img tesseract = nil; //deallocate and free all memory } +//DD TODO +/* +- (void)progressImageRecognitionForTesseract:(Tesseract*)tesseract { + NSLog(@"progress: %d", tesseract.progress); +} + */ + - (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract { NSLog(@"progress: %d", tesseract.progress); return NO; // return YES, if you need to interrupt tesseract before it finishes diff --git a/Tesseract OCR iOS.xcodeproj/project.pbxproj b/Tesseract OCR iOS.xcodeproj/project.pbxproj index 7d90d471..2a037224 100644 --- a/Tesseract OCR iOS.xcodeproj/project.pbxproj +++ b/Tesseract OCR iOS.xcodeproj/project.pbxproj @@ -986,7 +986,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; - ONLY_ACTIVE_ARCH = YES; + ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-ObjC", "-lstdc++", diff --git a/TesseractOCR/Tesseract.h b/TesseractOCR/Tesseract.h index f3182815..883c9f00 100755 --- a/TesseractOCR/Tesseract.h +++ b/TesseractOCR/Tesseract.h @@ -13,6 +13,7 @@ @protocol TesseractDelegate @optional +- (void)progressImageRecognitionForTesseract:(Tesseract*)tesseract; - (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract; @end diff --git a/TesseractOCR/Tesseract.mm b/TesseractOCR/Tesseract.mm index 9a7e5671..18f7ddfc 100755 --- a/TesseractOCR/Tesseract.mm +++ b/TesseractOCR/Tesseract.mm @@ -81,7 +81,7 @@ - (id)initPrivateWithDataPath:(NSString *)dataPath language:(NSString *)language _language = language; _monitor = new ETEXT_DESC(); - _monitor->cancel = (CANCEL_FUNC)[self methodForSelector:@selector(tesserackCallbackFunction:)]; + _monitor->cancel = (CANCEL_FUNC)[self methodForSelector:@selector(tesseractCancelCallbackFunction:)]; _monitor->cancel_this = (__bridge void*)self; _variables = [[NSMutableDictionary alloc] init]; @@ -243,7 +243,6 @@ - (NSString *)recognizedText { } - (short)progress { - return _monitor->progress; } @@ -260,7 +259,15 @@ - (BOOL)recognize { return (returnCode == 0) ? YES : NO; } -- (BOOL)tesserackCallbackFunction:(int)words { +- (void)tesseractProgressCallbackFunction:(int)words { + + SEL selector = @selector(progressImageRecognitionForTesseract:); + + if([self.delegate respondsToSelector:selector]) + [self.delegate progressImageRecognitionForTesseract:self]; +} + +- (BOOL)tesseractCancelCallbackFunction:(int)words { if (_monitor->ocr_alive == 1) _monitor->ocr_alive = 0; diff --git a/TesseractOCR/TesseractOCR-Info.plist b/TesseractOCR/TesseractOCR-Info.plist index 14327df4..361370fc 100644 --- a/TesseractOCR/TesseractOCR-Info.plist +++ b/TesseractOCR/TesseractOCR-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.21 + 2.22 CFBundleSignature ???? CFBundleVersion - 2.21 + 2.22 CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration diff --git a/TesseractOCRiOS.podspec b/TesseractOCRiOS.podspec index e907aa70..f12e459c 100644 --- a/TesseractOCRiOS.podspec +++ b/TesseractOCRiOS.podspec @@ -1,15 +1,15 @@ Pod::Spec.new do |s| s.name = 'TesseractOCRiOS' - s.version = '2.21' + s.version = '2.22' s.summary = 'It helps you to use OCR in iOS projects, writing Objective-C. Easy and fast.' - s.homepage = 'https://code.google.com/p/tesseract-ocr/' - s.documentation_url = 'https://code.google.com/p/tesseract-ocr/wiki/FAQ' + s.homepage = 'https://github.com/gali8/Tesseract-OCR-iOS' + s.documentation_url = 'https://github.com/gali8/Tesseract-OCR-iOS/blob/master/README.md' s.license = 'MIT' - s.author = { 'Daniele Galiotto' => '' } - s.source = { :git => 'https://github.com/gali8/Tesseract-OCR-iOS', :branch => "podspec" } + s.author = { 'Daniele Galiotto' => 'genius@g8production.com' } + s.source = { :git => 'https://github.com/gali8/Tesseract-OCR-iOS', :branch => "master" } s.platform = :ios, '5.0' s.source_files = 'Classes'