diff --git a/Dictionaries/en_US_user.xml b/Dictionaries/en_US_user.xml index 393da92ea..846e824e4 100644 --- a/Dictionaries/en_US_user.xml +++ b/Dictionaries/en_US_user.xml @@ -78,6 +78,7 @@ clanky cliché clozapine + co2 cobalt collywobbles colonoscopy @@ -409,6 +410,7 @@ ununquadium ununseptium ununtrium + uplink uranium vaccinologist vanadium diff --git a/Dictionaries/eng_OCRFixReplaceList.xml b/Dictionaries/eng_OCRFixReplaceList.xml index d82b7cb5e..0bbc80fce 100644 --- a/Dictionaries/eng_OCRFixReplaceList.xml +++ b/Dictionaries/eng_OCRFixReplaceList.xml @@ -371,6 +371,7 @@ + @@ -805,6 +806,7 @@ + diff --git a/Ocr/Latin.nocr b/Ocr/Latin.nocr index 3f8962d08..d28fd9358 100644 Binary files a/Ocr/Latin.nocr and b/Ocr/Latin.nocr differ diff --git a/libse/NikseBitmap.cs b/libse/NikseBitmap.cs index 1572713c6..692d6b020 100644 --- a/libse/NikseBitmap.cs +++ b/libse/NikseBitmap.cs @@ -1356,6 +1356,33 @@ namespace Nikse.SubtitleEdit.Core return true; } + public int GetNonTransparentHeight() + { + var startY = 0; + int transparentBottomPixels = 0; + for (int y = 0; y < Height; y++) + { + var isLineTransparent = IsLineTransparent(y); + if (startY == y && !isLineTransparent) + { + startY++; + continue; + } + + if (isLineTransparent) + { + transparentBottomPixels++; + } + else + { + transparentBottomPixels = 0; + } + } + + return startY - transparentBottomPixels; + } + + public void EnsureEvenLines(Color fillColor) { if (Width % 2 == 0 && Height % 2 == 0)