fix for issue 463 (GetHOCRText segfaults unless SetInputName has been called first); removed declaration of GetLastInitLanguage

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@684 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
zdenop@gmail.com 2012-02-27 17:19:20 +00:00
parent bf7ca288ac
commit df1cbdd7d3
2 changed files with 5 additions and 3 deletions

View File

@ -930,6 +930,8 @@ static void AddBoxTohOCR(const PageIterator *it,
// Make a HTML-formatted string with hOCR markup from the internal
// data structures.
// page_number is 0-based but will appear in the output as 1-based.
// Image name/input_file_ can be set by SetInputName before calling
// GetHOCRText
// STL removed from original patch submission and refactored by rays.
char* TessBaseAPI::GetHOCRText(int page_number) {
if (tesseract_ == NULL ||
@ -941,6 +943,9 @@ char* TessBaseAPI::GetHOCRText(int page_number) {
STRING hocr_str("");
if (input_file_ == NULL)
SetInputName(NULL);
hocr_str.add_str_int("<div class='ocr_page' id='page_", page_id);
hocr_str += "' title='image \"";
hocr_str += *input_file_;

View File

@ -606,9 +606,6 @@ class TESSDLL_API TessBaseAPI {
/** Return the number of dawgs loaded into tesseract_ object. */
int NumDawgs() const;
/** Return the language used in the last valid initialization. */
const char* GetLastInitLanguage() const;
// Returns a ROW object created from the input row specification.
static ROW *MakeTessOCRRow(float baseline, float xheight,
float descender, float ascender);