Fix regarding apostrophe in "Binary image compare" for small fonts

This commit is contained in:
Nikolaj Olsson 2016-07-19 07:24:22 +02:00
parent 3e378a3aaf
commit afea7c063e
2 changed files with 9 additions and 1 deletions

View File

@ -3200,7 +3200,7 @@ namespace Nikse.SubtitleEdit.Forms
{
return new CompareMatch(",", false, 0, null);
}
if (bob.IsApostrophe())
if (maxDiff > 0 && bob.IsApostrophe())
{
return new CompareMatch("'", false, 0, null);
}

View File

@ -337,6 +337,14 @@ namespace Nikse.SubtitleEdit.Logic.Ocr.Binary
{
return false;
}
if ((double)Width * Height / NumberOfColoredPixels > 1.2)
{
return false;
}
if ((double)Height / Width < 2)
{
return false;
}
return true;
}