Fixed issue 257

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@325 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
theraysmith 2010-05-17 21:15:14 +00:00
parent 04aeb741af
commit 5d00a436d1

View File

@ -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);