diff --git a/Dictionaries/eng_OCRFixReplaceList.xml b/Dictionaries/eng_OCRFixReplaceList.xml
index 2ed07079c..7ac4419c7 100644
--- a/Dictionaries/eng_OCRFixReplaceList.xml
+++ b/Dictionaries/eng_OCRFixReplaceList.xml
@@ -994,8 +994,10 @@
+
+
@@ -1068,6 +1070,7 @@
+
@@ -1942,6 +1945,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Ocr/Latin.db b/Ocr/Latin.db
index f4b6f891c..73655e686 100644
Binary files a/Ocr/Latin.db and b/Ocr/Latin.db differ
diff --git a/src/Forms/Ocr/VobSubOcr.cs b/src/Forms/Ocr/VobSubOcr.cs
index 0f6133a9d..286d9983c 100644
--- a/src/Forms/Ocr/VobSubOcr.cs
+++ b/src/Forms/Ocr/VobSubOcr.cs
@@ -21,6 +21,7 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
+using Nikse.SubtitleEdit.Controls;
namespace Nikse.SubtitleEdit.Forms.Ocr
{
@@ -352,6 +353,10 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
buttonOK.Text = Configuration.Settings.Language.General.Ok;
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
subtitleListView1.InitializeLanguage(Configuration.Settings.Language.General, Configuration.Settings);
+ subtitleListView1.HideColumn(SubtitleListView.SubtitleColumn.CharactersPerSeconds);
+ subtitleListView1.HideColumn(SubtitleListView.SubtitleColumn.Actor);
+ subtitleListView1.HideColumn(SubtitleListView.SubtitleColumn.WordsPerMinute);
+ subtitleListView1.HideColumn(SubtitleListView.SubtitleColumn.Region);
subtitleListView1.AutoSizeColumns();
groupBoxImagePalette.Text = language.ImagePalette;
diff --git a/src/Forms/Ocr/VobSubOcrCharacterInspect.cs b/src/Forms/Ocr/VobSubOcrCharacterInspect.cs
index 23e2eeeb3..05d0f94ef 100644
--- a/src/Forms/Ocr/VobSubOcrCharacterInspect.cs
+++ b/src/Forms/Ocr/VobSubOcrCharacterInspect.cs
@@ -80,7 +80,14 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
_selectedCompareNode = null;
_selectedCompareBinaryOcrBitmap = null;
- pictureBoxInspectItem.Image = _imageSources[listBoxInspectItems.SelectedIndex];
+ var img = _imageSources[listBoxInspectItems.SelectedIndex];
+ pictureBoxInspectItem.Image = img;
+ if (img != null)
+ {
+ pictureBoxInspectItem.Width = img.Width;
+ pictureBoxInspectItem.Height = img.Height;
+ }
+
pictureBoxCompareBitmap.Image = null;
pictureBoxCompareBitmapDouble.Image = null;
@@ -99,13 +106,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
textBoxText.Text = bob.Text;
checkBoxItalic.Checked = bob.Italic;
_selectedCompareBinaryOcrBitmap = bob;
-
- var bitmap = bob.ToOldBitmap();
- pictureBoxCompareBitmap.Image = bitmap;
- pictureBoxCompareBitmapDouble.Width = bitmap.Width * 2;
- pictureBoxCompareBitmapDouble.Height = bitmap.Height * 2;
- pictureBoxCompareBitmapDouble.Image = bitmap;
-
+ SetDbItemView(bob.ToOldBitmap());
var matchBob = new BinaryOcrBitmap(new NikseBitmap(_imageSources[listBoxInspectItems.SelectedIndex]));
if (matchBob.Hash == bob.Hash && matchBob.Width == bob.Width && matchBob.Height == bob.Height && matchBob.NumberOfColoredPixels == bob.NumberOfColoredPixels)
{
@@ -115,7 +116,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
{
buttonAddBetterMatch.Enabled = true;
}
-
bobFound = true;
break;
}
@@ -129,14 +129,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
textBoxText.Text = bob.Text;
checkBoxItalic.Checked = bob.Italic;
_selectedCompareBinaryOcrBitmap = bob;
-
- var bitmap = bob.ToOldBitmap();
- pictureBoxCompareBitmap.Image = bitmap;
- pictureBoxCompareBitmapDouble.Width = bitmap.Width * 2;
- pictureBoxCompareBitmapDouble.Height = bitmap.Height * 2;
- pictureBoxCompareBitmapDouble.Image = bitmap;
+ SetDbItemView(bob.ToOldBitmap());
buttonAddBetterMatch.Enabled = false; // exact match
- labelExpandCount.Text = string.Format("Expand count: {0}", bob.ExpandCount);
+ labelExpandCount.Text = $"Expand count: {bob.ExpandCount}";
break;
}
}
@@ -161,10 +156,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
f.Position = pos;
var mbmp = new ManagedBitmap(f);
var bitmap = mbmp.ToOldBitmap();
- pictureBoxCompareBitmap.Image = bitmap;
- pictureBoxCompareBitmapDouble.Width = bitmap.Width * 2;
- pictureBoxCompareBitmapDouble.Height = bitmap.Height * 2;
- pictureBoxCompareBitmapDouble.Image = bitmap;
+ SetDbItemView(mbmp.ToOldBitmap());
labelImageInfo.Text = string.Format(Configuration.Settings.Language.VobSubEditCharacters.Image + " - {0}x{1}", bitmap.Width, bitmap.Height);
}
catch (Exception exception)
@@ -212,6 +204,16 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
}
}
+ private void SetDbItemView(Bitmap bitmap)
+ {
+ pictureBoxCompareBitmap.Image = bitmap;
+ pictureBoxCompareBitmap.Width = bitmap.Width;
+ pictureBoxCompareBitmap.Height = bitmap.Height;
+ pictureBoxCompareBitmapDouble.Width = bitmap.Width * 2;
+ pictureBoxCompareBitmapDouble.Height = bitmap.Height * 2;
+ pictureBoxCompareBitmapDouble.Image = bitmap;
+ }
+
private void buttonUpdate_Click(object sender, EventArgs e)
{
if (_selectedCompareNode == null && _selectedCompareBinaryOcrBitmap == null)