Skip to content

Commit af68c6a

Browse files
committed
default-resolution: Update constant. Use sourceResolution in pixForImage
1 parent 32d3da9 commit af68c6a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

TesseractOCR/G8Tesseract.mm

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

25-
static int const kG8DefaultResolution = 300;
25+
static int const kG8DefaultResolution = 72;
2626

2727
namespace tesseract {
2828
class TessBaseAPI;
@@ -379,7 +379,6 @@ - (void)setImage:(UIImage *)image
379379
pixDestroy(&pix);
380380

381381
_image = image;
382-
_sourceResolution = kG8DefaultResolution;
383382
_rect = (CGRect){CGPointZero, self.imageSize};
384383

385384
[self resetFlags];
@@ -776,7 +775,7 @@ - (Pix *)pixForImage:(UIImage *)image
776775
default:
777776
NSLog(@"Cannot convert image to Pix with bpp = %d", bpp);
778777
}
779-
pixSetYRes(pix, kG8DefaultResolution);
778+
pixSetYRes(pix, (l_int32)self.sourceResolution);
780779

781780
CFRelease(imageData);
782781

0 commit comments

Comments
 (0)