Skip to content

Commit 32d3da9

Browse files
committed
default-resolution: Make default resolution const
1 parent eaf49dd commit 32d3da9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

TesseractOCR/G8Tesseract.mm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#import "genericvector.h"
2323
#import "strngs.h"
2424

25+
static int const kG8DefaultResolution = 300;
26+
2527
namespace tesseract {
2628
class TessBaseAPI;
2729
};
@@ -98,7 +100,7 @@ - (id)initWithLanguage:(NSString *)language
98100
_engineMode = engineMode;
99101
_pageSegmentationMode = G8PageSegmentationModeSingleBlock;
100102
_variables = [NSMutableDictionary dictionary];
101-
_sourceResolution = 300;
103+
_sourceResolution = kG8DefaultResolution;
102104
_rect = CGRectZero;
103105

104106
_monitor = new ETEXT_DESC();
@@ -377,7 +379,7 @@ - (void)setImage:(UIImage *)image
377379
pixDestroy(&pix);
378380

379381
_image = image;
380-
_sourceResolution = 300;
382+
_sourceResolution = kG8DefaultResolution;
381383
_rect = (CGRect){CGPointZero, self.imageSize};
382384

383385
[self resetFlags];
@@ -774,7 +776,7 @@ - (Pix *)pixForImage:(UIImage *)image
774776
default:
775777
NSLog(@"Cannot convert image to Pix with bpp = %d", bpp);
776778
}
777-
pixSetYRes(pix, 300);
779+
pixSetYRes(pix, kG8DefaultResolution);
778780

779781
CFRelease(imageData);
780782

0 commit comments

Comments
 (0)