mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
Fixed issue 257
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@325 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
04aeb741af
commit
5d00a436d1
@ -273,7 +273,7 @@ char* TessBaseAPI::TesseractRect(const unsigned char* imagedata,
|
||||
// Since this original api didn't give the exact size of the image,
|
||||
// we have to invent a reasonable value.
|
||||
int bits_per_pixel = bytes_per_pixel == 0 ? 1 : bytes_per_pixel * 8;
|
||||
SetImage(imagedata, bytes_per_line * 8 / bits_per_pixel, height,
|
||||
SetImage(imagedata, bytes_per_line * 8 / bits_per_pixel, height + top,
|
||||
bytes_per_pixel, bytes_per_line);
|
||||
SetRectangle(left, top, width, height);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user