Commit 454e5e5f authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #5461 from berak:fix_putText_24

parents 59082c8e bb9bd313
...@@ -2095,7 +2095,7 @@ void putText( Mat& img, const string& text, Point org, ...@@ -2095,7 +2095,7 @@ void putText( Mat& img, const string& text, Point org,
pts.reserve(1 << 10); pts.reserve(1 << 10);
const char **faces = cv::g_HersheyGlyphs; const char **faces = cv::g_HersheyGlyphs;
for( int i = 0; text[i] != '\0'; i++ ) for( int i = 0; i < (int)text.size(); i++ )
{ {
int c = (uchar)text[i]; int c = (uchar)text[i];
Point p; Point p;
...@@ -2142,7 +2142,7 @@ Size getTextSize( const string& text, int fontFace, double fontScale, int thickn ...@@ -2142,7 +2142,7 @@ Size getTextSize( const string& text, int fontFace, double fontScale, int thickn
int cap_line = (ascii[0] >> 4) & 15; int cap_line = (ascii[0] >> 4) & 15;
size.height = cvRound((cap_line + base_line)*fontScale + (thickness+1)/2); size.height = cvRound((cap_line + base_line)*fontScale + (thickness+1)/2);
for( int i = 0; text[i] != '\0'; i++ ) for( int i = 0; i < (int)text.size(); i++ )
{ {
int c = (uchar)text[i]; int c = (uchar)text[i];
Point p; Point p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment