From 9d09925ea2c8b049b0f682afa0b206b6a4dd4271 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 9 Jan 2011 14:09:53 +0000 Subject: [PATCH] Added "save all images" in context menu in ocr window - thx Almogzt git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@235 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Forms/Main.Designer.cs | 2 +- src/Forms/Main.resx | 3 + src/Forms/VobSubOcr.Designer.cs | 97 +++++++++++++++++--------------- src/Forms/VobSubOcr.cs | 41 +++++++++++--- src/Forms/VobSubOcr.resx | 3 + src/Logic/Language.cs | 2 + src/Logic/LanguageStructure.cs | 2 + src/Resources/da-DK.xml | 2 + src/Resources/da-DK.xml.zip | Bin 20855 -> 20900 bytes 9 files changed, 98 insertions(+), 54 deletions(-) diff --git a/src/Forms/Main.Designer.cs b/src/Forms/Main.Designer.cs index 7a523e84a..aacc4fe3a 100644 --- a/src/Forms/Main.Designer.cs +++ b/src/Forms/Main.Designer.cs @@ -1558,7 +1558,7 @@ this.fixCommonErrorsInSelectedLinesToolStripMenuItem, this.changeCasingForSelectedLinesToolStripMenuItem}); this.contextMenuStripListview.Name = "contextMenuStripListview"; - this.contextMenuStripListview.Size = new System.Drawing.Size(276, 584); + this.contextMenuStripListview.Size = new System.Drawing.Size(276, 562); this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening); // // toolStripMenuItemDelete diff --git a/src/Forms/Main.resx b/src/Forms/Main.resx index 29380b251..752d627b4 100644 --- a/src/Forms/Main.resx +++ b/src/Forms/Main.resx @@ -580,6 +580,9 @@ 449, 58 + + 449, 58 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/src/Forms/VobSubOcr.Designer.cs b/src/Forms/VobSubOcr.Designer.cs index 88c3f690e..4d8b11e38 100644 --- a/src/Forms/VobSubOcr.Designer.cs +++ b/src/Forms/VobSubOcr.Designer.cs @@ -93,6 +93,8 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxShowOnlyForced = new System.Windows.Forms.CheckBox(); this.checkBoxUseTimeCodesFromIdx = new System.Windows.Forms.CheckBox(); this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView(); + this.saveAllImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxSubtitleImage)).BeginInit(); this.contextMenuStripListview.SuspendLayout(); this.groupBoxOcrMethod.SuspendLayout(); @@ -130,9 +132,10 @@ namespace Nikse.SubtitleEdit.Forms this.normalToolStripMenuItem, this.italicToolStripMenuItem, this.toolStripSeparator1, - this.saveImageAsToolStripMenuItem}); + this.saveImageAsToolStripMenuItem, + this.saveAllImagesToolStripMenuItem}); this.contextMenuStripListview.Name = "contextMenuStripListview"; - this.contextMenuStripListview.Size = new System.Drawing.Size(158, 76); + this.contextMenuStripListview.Size = new System.Drawing.Size(164, 120); this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening); // // normalToolStripMenuItem @@ -166,7 +169,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelSubtitleText.AutoSize = true; this.labelSubtitleText.Location = new System.Drawing.Point(12, 207); this.labelSubtitleText.Name = "labelSubtitleText"; - this.labelSubtitleText.Size = new System.Drawing.Size(82, 17); + this.labelSubtitleText.Size = new System.Drawing.Size(66, 13); this.labelSubtitleText.TabIndex = 6; this.labelSubtitleText.Text = "Subtitle text"; // @@ -185,7 +188,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelStatus.AutoSize = true; this.labelStatus.Location = new System.Drawing.Point(12, 535); this.labelStatus.Name = "labelStatus"; - this.labelStatus.Size = new System.Drawing.Size(166, 17); + this.labelStatus.Size = new System.Drawing.Size(131, 13); this.labelStatus.TabIndex = 8; this.labelStatus.Text = "Loading VobSub images..."; // @@ -236,7 +239,7 @@ namespace Nikse.SubtitleEdit.Forms "OCR via Microsoftr MODI"}); this.comboBoxOcrMethod.Location = new System.Drawing.Point(13, 16); this.comboBoxOcrMethod.Name = "comboBoxOcrMethod"; - this.comboBoxOcrMethod.Size = new System.Drawing.Size(366, 25); + this.comboBoxOcrMethod.Size = new System.Drawing.Size(366, 21); this.comboBoxOcrMethod.TabIndex = 33; this.comboBoxOcrMethod.SelectedIndexChanged += new System.EventHandler(this.ComboBoxOcrMethodSelectedIndexChanged); // @@ -260,7 +263,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxUseModiInTesseractForUnknownWords.Enabled = false; this.checkBoxUseModiInTesseractForUnknownWords.Location = new System.Drawing.Point(22, 74); this.checkBoxUseModiInTesseractForUnknownWords.Name = "checkBoxUseModiInTesseractForUnknownWords"; - this.checkBoxUseModiInTesseractForUnknownWords.Size = new System.Drawing.Size(212, 21); + this.checkBoxUseModiInTesseractForUnknownWords.Size = new System.Drawing.Size(165, 17); this.checkBoxUseModiInTesseractForUnknownWords.TabIndex = 39; this.checkBoxUseModiInTesseractForUnknownWords.Text = "Try MODI for unknown words"; this.checkBoxUseModiInTesseractForUnknownWords.UseVisualStyleBackColor = true; @@ -270,7 +273,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelTesseractLanguage.AutoSize = true; this.labelTesseractLanguage.Location = new System.Drawing.Point(18, 34); this.labelTesseractLanguage.Name = "labelTesseractLanguage"; - this.labelTesseractLanguage.Size = new System.Drawing.Size(68, 17); + this.labelTesseractLanguage.Size = new System.Drawing.Size(54, 13); this.labelTesseractLanguage.TabIndex = 4; this.labelTesseractLanguage.Text = "Language"; // @@ -280,7 +283,7 @@ namespace Nikse.SubtitleEdit.Forms this.comboBoxTesseractLanguages.FormattingEnabled = true; this.comboBoxTesseractLanguages.Location = new System.Drawing.Point(79, 31); this.comboBoxTesseractLanguages.Name = "comboBoxTesseractLanguages"; - this.comboBoxTesseractLanguages.Size = new System.Drawing.Size(195, 25); + this.comboBoxTesseractLanguages.Size = new System.Drawing.Size(195, 21); this.comboBoxTesseractLanguages.TabIndex = 34; this.comboBoxTesseractLanguages.SelectedIndexChanged += new System.EventHandler(this.ComboBoxTesseractLanguagesSelectedIndexChanged); // @@ -300,7 +303,7 @@ namespace Nikse.SubtitleEdit.Forms this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(18, 36); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(68, 17); + this.label1.Size = new System.Drawing.Size(54, 13); this.label1.TabIndex = 33; this.label1.Text = "Language"; // @@ -310,7 +313,7 @@ namespace Nikse.SubtitleEdit.Forms this.comboBoxModiLanguage.FormattingEnabled = true; this.comboBoxModiLanguage.Location = new System.Drawing.Point(79, 33); this.comboBoxModiLanguage.Name = "comboBoxModiLanguage"; - this.comboBoxModiLanguage.Size = new System.Drawing.Size(195, 25); + this.comboBoxModiLanguage.Size = new System.Drawing.Size(195, 21); this.comboBoxModiLanguage.TabIndex = 9; this.comboBoxModiLanguage.SelectedIndexChanged += new System.EventHandler(this.ComboBoxModiLanguageSelectedIndexChanged); // @@ -335,7 +338,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxRightToLeft.AutoSize = true; this.checkBoxRightToLeft.Location = new System.Drawing.Point(128, 112); this.checkBoxRightToLeft.Name = "checkBoxRightToLeft"; - this.checkBoxRightToLeft.Size = new System.Drawing.Size(102, 21); + this.checkBoxRightToLeft.Size = new System.Drawing.Size(80, 17); this.checkBoxRightToLeft.TabIndex = 40; this.checkBoxRightToLeft.Text = "Right to left"; this.checkBoxRightToLeft.UseVisualStyleBackColor = true; @@ -354,7 +357,7 @@ namespace Nikse.SubtitleEdit.Forms 0, 0}); this.numericUpDownPixelsIsSpace.Name = "numericUpDownPixelsIsSpace"; - this.numericUpDownPixelsIsSpace.Size = new System.Drawing.Size(50, 24); + this.numericUpDownPixelsIsSpace.Size = new System.Drawing.Size(50, 21); this.numericUpDownPixelsIsSpace.TabIndex = 35; this.numericUpDownPixelsIsSpace.Value = new decimal(new int[] { 1, @@ -377,7 +380,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelNoOfPixelsIsSpace.AutoSize = true; this.labelNoOfPixelsIsSpace.Location = new System.Drawing.Point(18, 90); this.labelNoOfPixelsIsSpace.Name = "labelNoOfPixelsIsSpace"; - this.labelNoOfPixelsIsSpace.Size = new System.Drawing.Size(129, 17); + this.labelNoOfPixelsIsSpace.Size = new System.Drawing.Size(104, 13); this.labelNoOfPixelsIsSpace.TabIndex = 34; this.labelNoOfPixelsIsSpace.Text = "No of pixels is space"; // @@ -387,7 +390,7 @@ namespace Nikse.SubtitleEdit.Forms this.comboBoxCharacterDatabase.FormattingEnabled = true; this.comboBoxCharacterDatabase.Location = new System.Drawing.Point(130, 30); this.comboBoxCharacterDatabase.Name = "comboBoxCharacterDatabase"; - this.comboBoxCharacterDatabase.Size = new System.Drawing.Size(167, 25); + this.comboBoxCharacterDatabase.Size = new System.Drawing.Size(167, 21); this.comboBoxCharacterDatabase.TabIndex = 31; this.comboBoxCharacterDatabase.SelectedIndexChanged += new System.EventHandler(this.ComboBoxCharacterDatabaseSelectedIndexChanged); // @@ -396,7 +399,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelImageDatabase.AutoSize = true; this.labelImageDatabase.Location = new System.Drawing.Point(41, 33); this.labelImageDatabase.Name = "labelImageDatabase"; - this.labelImageDatabase.Size = new System.Drawing.Size(105, 17); + this.labelImageDatabase.Size = new System.Drawing.Size(85, 13); this.labelImageDatabase.TabIndex = 30; this.labelImageDatabase.Text = "Image database"; // @@ -440,7 +443,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelStartFrom.AutoSize = true; this.labelStartFrom.Location = new System.Drawing.Point(124, 14); this.labelStartFrom.Name = "labelStartFrom"; - this.labelStartFrom.Size = new System.Drawing.Size(160, 17); + this.labelStartFrom.Size = new System.Drawing.Size(127, 13); this.labelStartFrom.TabIndex = 31; this.labelStartFrom.Text = "Start OCR from subtitle#"; // @@ -458,7 +461,7 @@ namespace Nikse.SubtitleEdit.Forms 0, 0}); this.numericUpDownStartNumber.Name = "numericUpDownStartNumber"; - this.numericUpDownStartNumber.Size = new System.Drawing.Size(64, 24); + this.numericUpDownStartNumber.Size = new System.Drawing.Size(64, 21); this.numericUpDownStartNumber.TabIndex = 30; this.numericUpDownStartNumber.Value = new decimal(new int[] { 1, @@ -515,7 +518,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxGuessUnknownWords.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxGuessUnknownWords.Location = new System.Drawing.Point(11, 83); this.checkBoxGuessUnknownWords.Name = "checkBoxGuessUnknownWords"; - this.checkBoxGuessUnknownWords.Size = new System.Drawing.Size(210, 21); + this.checkBoxGuessUnknownWords.Size = new System.Drawing.Size(162, 17); this.checkBoxGuessUnknownWords.TabIndex = 39; this.checkBoxGuessUnknownWords.Text = "Try to guess unknown words"; this.checkBoxGuessUnknownWords.UseVisualStyleBackColor = true; @@ -537,10 +540,10 @@ namespace Nikse.SubtitleEdit.Forms // tabPageAllFixes // this.tabPageAllFixes.Controls.Add(this.listBoxLog); - this.tabPageAllFixes.Location = new System.Drawing.Point(4, 26); + this.tabPageAllFixes.Location = new System.Drawing.Point(4, 22); this.tabPageAllFixes.Name = "tabPageAllFixes"; this.tabPageAllFixes.Padding = new System.Windows.Forms.Padding(3); - this.tabPageAllFixes.Size = new System.Drawing.Size(281, 154); + this.tabPageAllFixes.Size = new System.Drawing.Size(281, 158); this.tabPageAllFixes.TabIndex = 0; this.tabPageAllFixes.Text = "All fixes"; this.tabPageAllFixes.UseVisualStyleBackColor = true; @@ -552,20 +555,19 @@ namespace Nikse.SubtitleEdit.Forms | System.Windows.Forms.AnchorStyles.Right))); this.listBoxLog.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.listBoxLog.FormattingEnabled = true; - this.listBoxLog.ItemHeight = 17; this.listBoxLog.Location = new System.Drawing.Point(5, 6); this.listBoxLog.Name = "listBoxLog"; - this.listBoxLog.Size = new System.Drawing.Size(270, 106); + this.listBoxLog.Size = new System.Drawing.Size(270, 95); this.listBoxLog.TabIndex = 39; this.listBoxLog.SelectedIndexChanged += new System.EventHandler(this.ListBoxLogSelectedIndexChanged); // // tabPageSuggestions // this.tabPageSuggestions.Controls.Add(this.listBoxLogSuggestions); - this.tabPageSuggestions.Location = new System.Drawing.Point(4, 26); + this.tabPageSuggestions.Location = new System.Drawing.Point(4, 22); this.tabPageSuggestions.Name = "tabPageSuggestions"; this.tabPageSuggestions.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSuggestions.Size = new System.Drawing.Size(281, 154); + this.tabPageSuggestions.Size = new System.Drawing.Size(281, 158); this.tabPageSuggestions.TabIndex = 1; this.tabPageSuggestions.Text = "Guesses used"; this.tabPageSuggestions.UseVisualStyleBackColor = true; @@ -577,19 +579,18 @@ namespace Nikse.SubtitleEdit.Forms | System.Windows.Forms.AnchorStyles.Right))); this.listBoxLogSuggestions.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.listBoxLogSuggestions.FormattingEnabled = true; - this.listBoxLogSuggestions.ItemHeight = 17; this.listBoxLogSuggestions.Location = new System.Drawing.Point(5, 6); this.listBoxLogSuggestions.Name = "listBoxLogSuggestions"; - this.listBoxLogSuggestions.Size = new System.Drawing.Size(244, 89); + this.listBoxLogSuggestions.Size = new System.Drawing.Size(244, 82); this.listBoxLogSuggestions.TabIndex = 40; this.listBoxLogSuggestions.SelectedIndexChanged += new System.EventHandler(this.ListBoxLogSelectedIndexChanged); // // tabPageUnknownWords // this.tabPageUnknownWords.Controls.Add(this.listBoxUnknownWords); - this.tabPageUnknownWords.Location = new System.Drawing.Point(4, 26); + this.tabPageUnknownWords.Location = new System.Drawing.Point(4, 22); this.tabPageUnknownWords.Name = "tabPageUnknownWords"; - this.tabPageUnknownWords.Size = new System.Drawing.Size(281, 154); + this.tabPageUnknownWords.Size = new System.Drawing.Size(281, 158); this.tabPageUnknownWords.TabIndex = 2; this.tabPageUnknownWords.Text = "Unknown words"; this.tabPageUnknownWords.UseVisualStyleBackColor = true; @@ -601,10 +602,9 @@ namespace Nikse.SubtitleEdit.Forms | System.Windows.Forms.AnchorStyles.Right))); this.listBoxUnknownWords.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.listBoxUnknownWords.FormattingEnabled = true; - this.listBoxUnknownWords.ItemHeight = 17; this.listBoxUnknownWords.Location = new System.Drawing.Point(5, 6); this.listBoxUnknownWords.Name = "listBoxUnknownWords"; - this.listBoxUnknownWords.Size = new System.Drawing.Size(244, 89); + this.listBoxUnknownWords.Size = new System.Drawing.Size(244, 82); this.listBoxUnknownWords.TabIndex = 40; this.listBoxUnknownWords.SelectedIndexChanged += new System.EventHandler(this.ListBoxLogSelectedIndexChanged); // @@ -613,7 +613,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelFixesMade.AutoSize = true; this.labelFixesMade.Location = new System.Drawing.Point(144, 40); this.labelFixesMade.Name = "labelFixesMade"; - this.labelFixesMade.Size = new System.Drawing.Size(123, 17); + this.labelFixesMade.Size = new System.Drawing.Size(98, 13); this.labelFixesMade.TabIndex = 35; this.labelFixesMade.Text = "NumberOfOcrFixes"; // @@ -624,7 +624,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxPromptForUnknownWords.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxPromptForUnknownWords.Location = new System.Drawing.Point(11, 61); this.checkBoxPromptForUnknownWords.Name = "checkBoxPromptForUnknownWords"; - this.checkBoxPromptForUnknownWords.Size = new System.Drawing.Size(328, 21); + this.checkBoxPromptForUnknownWords.Size = new System.Drawing.Size(246, 17); this.checkBoxPromptForUnknownWords.TabIndex = 38; this.checkBoxPromptForUnknownWords.Text = "Prompt for unknown words (requires dictionary)"; this.checkBoxPromptForUnknownWords.UseVisualStyleBackColor = true; @@ -636,7 +636,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxAutoBreakLines.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxAutoBreakLines.Location = new System.Drawing.Point(11, 105); this.checkBoxAutoBreakLines.Name = "checkBoxAutoBreakLines"; - this.checkBoxAutoBreakLines.Size = new System.Drawing.Size(265, 21); + this.checkBoxAutoBreakLines.Size = new System.Drawing.Size(200, 17); this.checkBoxAutoBreakLines.TabIndex = 37; this.checkBoxAutoBreakLines.Text = "Auto break subtitle, if line number > 2"; this.checkBoxAutoBreakLines.UseVisualStyleBackColor = true; @@ -646,7 +646,7 @@ namespace Nikse.SubtitleEdit.Forms this.labelDictionaryLoaded.AutoSize = true; this.labelDictionaryLoaded.Location = new System.Drawing.Point(11, 19); this.labelDictionaryLoaded.Name = "labelDictionaryLoaded"; - this.labelDictionaryLoaded.Size = new System.Drawing.Size(141, 17); + this.labelDictionaryLoaded.Size = new System.Drawing.Size(112, 13); this.labelDictionaryLoaded.TabIndex = 36; this.labelDictionaryLoaded.Text = "labelDictionaryLoaded"; // @@ -657,7 +657,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxAutoFixCommonErrors.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxAutoFixCommonErrors.Location = new System.Drawing.Point(11, 39); this.checkBoxAutoFixCommonErrors.Name = "checkBoxAutoFixCommonErrors"; - this.checkBoxAutoFixCommonErrors.Size = new System.Drawing.Size(180, 21); + this.checkBoxAutoFixCommonErrors.Size = new System.Drawing.Size(137, 17); this.checkBoxAutoFixCommonErrors.TabIndex = 34; this.checkBoxAutoFixCommonErrors.Text = "Fix common OCR errors"; this.checkBoxAutoFixCommonErrors.UseVisualStyleBackColor = true; @@ -683,7 +683,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxEmphasis2Transparent.AutoSize = true; this.checkBoxEmphasis2Transparent.Location = new System.Drawing.Point(437, 19); this.checkBoxEmphasis2Transparent.Name = "checkBoxEmphasis2Transparent"; - this.checkBoxEmphasis2Transparent.Size = new System.Drawing.Size(108, 21); + this.checkBoxEmphasis2Transparent.Size = new System.Drawing.Size(83, 17); this.checkBoxEmphasis2Transparent.TabIndex = 6; this.checkBoxEmphasis2Transparent.Text = "Transparent"; this.checkBoxEmphasis2Transparent.UseVisualStyleBackColor = true; @@ -694,7 +694,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxEmphasis1Transparent.AutoSize = true; this.checkBoxEmphasis1Transparent.Location = new System.Drawing.Point(304, 19); this.checkBoxEmphasis1Transparent.Name = "checkBoxEmphasis1Transparent"; - this.checkBoxEmphasis1Transparent.Size = new System.Drawing.Size(108, 21); + this.checkBoxEmphasis1Transparent.Size = new System.Drawing.Size(83, 17); this.checkBoxEmphasis1Transparent.TabIndex = 5; this.checkBoxEmphasis1Transparent.Text = "Transparent"; this.checkBoxEmphasis1Transparent.UseVisualStyleBackColor = true; @@ -705,7 +705,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxPatternTransparent.AutoSize = true; this.checkBoxPatternTransparent.Location = new System.Drawing.Point(167, 19); this.checkBoxPatternTransparent.Name = "checkBoxPatternTransparent"; - this.checkBoxPatternTransparent.Size = new System.Drawing.Size(108, 21); + this.checkBoxPatternTransparent.Size = new System.Drawing.Size(83, 17); this.checkBoxPatternTransparent.TabIndex = 4; this.checkBoxPatternTransparent.Text = "Transparent"; this.checkBoxPatternTransparent.UseVisualStyleBackColor = true; @@ -749,7 +749,7 @@ namespace Nikse.SubtitleEdit.Forms this.checkBoxCustomFourColors.AutoSize = true; this.checkBoxCustomFourColors.Location = new System.Drawing.Point(7, 16); this.checkBoxCustomFourColors.Name = "checkBoxCustomFourColors"; - this.checkBoxCustomFourColors.Size = new System.Drawing.Size(150, 21); + this.checkBoxCustomFourColors.Size = new System.Drawing.Size(116, 17); this.checkBoxCustomFourColors.TabIndex = 0; this.checkBoxCustomFourColors.Text = "Use custom colors:"; this.checkBoxCustomFourColors.UseVisualStyleBackColor = true; @@ -770,9 +770,9 @@ namespace Nikse.SubtitleEdit.Forms // this.checkBoxShowOnlyForced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxShowOnlyForced.AutoSize = true; - this.checkBoxShowOnlyForced.Location = new System.Drawing.Point(414, 509); + this.checkBoxShowOnlyForced.Location = new System.Drawing.Point(414, 513); this.checkBoxShowOnlyForced.Name = "checkBoxShowOnlyForced"; - this.checkBoxShowOnlyForced.Size = new System.Drawing.Size(190, 21); + this.checkBoxShowOnlyForced.Size = new System.Drawing.Size(152, 17); this.checkBoxShowOnlyForced.TabIndex = 37; this.checkBoxShowOnlyForced.Text = "Show only forced subtitles"; this.checkBoxShowOnlyForced.UseVisualStyleBackColor = true; @@ -782,9 +782,9 @@ namespace Nikse.SubtitleEdit.Forms // this.checkBoxUseTimeCodesFromIdx.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxUseTimeCodesFromIdx.AutoSize = true; - this.checkBoxUseTimeCodesFromIdx.Location = new System.Drawing.Point(414, 526); + this.checkBoxUseTimeCodesFromIdx.Location = new System.Drawing.Point(414, 530); this.checkBoxUseTimeCodesFromIdx.Name = "checkBoxUseTimeCodesFromIdx"; - this.checkBoxUseTimeCodesFromIdx.Size = new System.Drawing.Size(230, 21); + this.checkBoxUseTimeCodesFromIdx.Size = new System.Drawing.Size(186, 17); this.checkBoxUseTimeCodesFromIdx.TabIndex = 38; this.checkBoxUseTimeCodesFromIdx.Text = "Use lines/time codes from .idx file"; this.checkBoxUseTimeCodesFromIdx.UseVisualStyleBackColor = true; @@ -808,9 +808,16 @@ namespace Nikse.SubtitleEdit.Forms this.subtitleListView1.View = System.Windows.Forms.View.Details; this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView1SelectedIndexChanged); // + // saveAllImagesToolStripMenuItem + // + this.saveAllImagesToolStripMenuItem.Name = "saveAllImagesToolStripMenuItem"; + this.saveAllImagesToolStripMenuItem.Size = new System.Drawing.Size(163, 22); + this.saveAllImagesToolStripMenuItem.Text = "Save all images..."; + this.saveAllImagesToolStripMenuItem.Click += new System.EventHandler(this.saveAllImagesToolStripMenuItem_Click); + // // VobSubOcr // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1023, 568); this.Controls.Add(this.checkBoxShowOnlyForced); @@ -930,5 +937,7 @@ namespace Nikse.SubtitleEdit.Forms private System.Windows.Forms.CheckBox checkBoxRightToLeft; private System.Windows.Forms.CheckBox checkBoxShowOnlyForced; private System.Windows.Forms.CheckBox checkBoxUseTimeCodesFromIdx; + private System.Windows.Forms.ToolStripMenuItem saveAllImagesToolStripMenuItem; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; } } \ No newline at end of file diff --git a/src/Forms/VobSubOcr.cs b/src/Forms/VobSubOcr.cs index 09a2c638b..cca505ba9 100644 --- a/src/Forms/VobSubOcr.cs +++ b/src/Forms/VobSubOcr.cs @@ -159,6 +159,11 @@ namespace Nikse.SubtitleEdit.Forms checkBoxShowOnlyForced.Text = language.ShowOnlyForcedSubtitles; checkBoxUseTimeCodesFromIdx.Text = language.UseTimeCodesFromIdx; + normalToolStripMenuItem.Text = Configuration.Settings.Language.Main.Menu.ContextMenu.Normal; + italicToolStripMenuItem.Text = Configuration.Settings.Language.General.Italic; + saveImageAsToolStripMenuItem.Text = language.SaveSubtitleImageAs; + saveAllImagesToolStripMenuItem.Text = language.SaveAllSubtitleImagesAs; + comboBoxTesseractLanguages.Left = labelTesseractLanguage.Left + labelTesseractLanguage.Width; FixLargeFonts(); @@ -1734,14 +1739,14 @@ namespace Nikse.SubtitleEdit.Forms try { - if (saveFileDialog1.FilterIndex == 0) - bmp.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Png); - else if (saveFileDialog1.FilterIndex == 1) - bmp.Save(saveFileDialog1.FileName); - else if (saveFileDialog1.FilterIndex == 2) - bmp.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Gif); - else - bmp.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Tiff); + if (saveFileDialog1.FilterIndex == 0) + bmp.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Png); + else if (saveFileDialog1.FilterIndex == 1) + bmp.Save(saveFileDialog1.FileName); + else if (saveFileDialog1.FilterIndex == 2) + bmp.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Gif); + else + bmp.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Tiff); } catch (Exception exception) { @@ -1750,6 +1755,25 @@ namespace Nikse.SubtitleEdit.Forms } } + private void saveAllImagesToolStripMenuItem_Click(object sender, EventArgs e) + { + int imagesSavedCount = 0; + if (folderBrowserDialog1.ShowDialog(this) == DialogResult.OK) + { + for (int i = 0; i < _subtitle.Paragraphs.Count; i++) + { + Bitmap bmp = GetSubtitleBitmap(i); + if (bmp != null) + { + string fileName = Path.Combine(folderBrowserDialog1.SelectedPath, i.ToString() + ".png"); + bmp.Save(fileName, System.Drawing.Imaging.ImageFormat.Png); + imagesSavedCount++; + } + } + MessageBox.Show(string.Format("{0} images saved in {1}", imagesSavedCount, folderBrowserDialog1.SelectedPath)); + } + } + private void NormalToolStripMenuItemClick(object sender, EventArgs e) { if (_subtitle.Paragraphs.Count > 0 && subtitleListView1.SelectedItems.Count > 0) @@ -1878,6 +1902,5 @@ namespace Nikse.SubtitleEdit.Forms subtitleListView1.EndUpdate(); } - } } diff --git a/src/Forms/VobSubOcr.resx b/src/Forms/VobSubOcr.resx index 481a7bdbf..c69700a67 100644 --- a/src/Forms/VobSubOcr.resx +++ b/src/Forms/VobSubOcr.resx @@ -126,4 +126,7 @@ 331, 17 + + 452, 17 + \ No newline at end of file diff --git a/src/Logic/Language.cs b/src/Logic/Language.cs index 332eb4f31..5ec8b4c64 100644 --- a/src/Logic/Language.cs +++ b/src/Logic/Language.cs @@ -1275,6 +1275,8 @@ can edit in same subtitle file (collaboration)", OcrViaTesseract = "OCR via Tesseract", FixOcrErrors = "Fix OCR errors", SaveSubtitleImageAs = "Save subtitle image as...", + SaveAllSubtitleImagesAs = "Save all subtitle images as...", + XImagesSavedInY = "{0} images saved in {1}", TryModiForUnknownWords = "Try MS MODI OCR for unknown words", DictionaryX = "Dictionary: {0}", RightToLeft = "Right to left", diff --git a/src/Logic/LanguageStructure.cs b/src/Logic/LanguageStructure.cs index 7e79c5839..e1936e5a5 100644 --- a/src/Logic/LanguageStructure.cs +++ b/src/Logic/LanguageStructure.cs @@ -1210,6 +1210,8 @@ public string OcrAutoCorrectionSpellchecking { get; set; } public string FixOcrErrors { get; set; } public string SaveSubtitleImageAs { get; set; } + public string SaveAllSubtitleImagesAs { get; set; } + public string XImagesSavedInY { get; set; } public string TryModiForUnknownWords { get; set; } public string DictionaryX { get; set; } public string RightToLeft { get; set; } diff --git a/src/Resources/da-DK.xml b/src/Resources/da-DK.xml index 3bf8b7f0d..c0b925285 100644 --- a/src/Resources/da-DK.xml +++ b/src/Resources/da-DK.xml @@ -1084,6 +1084,8 @@ Fortsæt? OCR automatisk korrektion / stavekontrol Ret OCR-fejl Gem undertekst billede som... + Gem alle undertekstl billeder som... + {0} billeder gemt i {1} Prøv MS MODI OCR for ukendte ord Ordbog: {0} Højre til venstre diff --git a/src/Resources/da-DK.xml.zip b/src/Resources/da-DK.xml.zip index 8693db1f8161129ddf271f81f33e61645349fb61..1b27ccc6edc8cfbfa934ff0d443809ec9ca47b71 100644 GIT binary patch delta 574 zcmV-E0>Sk~!uLSH z=tJ*2<%IRj6LLcu*p{=|yCaStXc4D*TYb(G1#uGDE&$(Yce_dm9 zu}|CS7uga)y5Tbp7b6bX>p6vWZ)JrR!6OZbQz&m~@#7LI6=MyX7`y#$MHa<<{MC$d zsP3)q*B@pOJumbPe;F-aW9$S;?vvw&%_AB@49vKD4UEkZ_ny7=-^)1tfy*z8cHH3j z9NN@h$MdEroD(-!Ng>wbTU{Wptr~0Mdp=e)zXOu z_V!Ihi)Hqk->amxf6W)Rvd)&1{+tyR2?NkF?2a5<&h4P6u_$jhL zXUik}KyK^tUH!oO`pb1I->>y+d|+rln^EF9yQs6({M%%<+~O>=&793nw~bLE9Cg{R zju49(Zs>kzhQn$2Sc;$jIBqF2ZK_(AF-RBEWYllT8_?Faft}3yB1f?Kvd%AyYE7%O zrADSi@VdC*GAw7eGeqXaCAp%l|K1Can~`gBQg?jbAX5PxHR~IGFRbIusTX(r MKY0hiMW_J*0PtNgH2?qr delta 529 zcmV+s0`C2!qXGA#0kCvWf5$kmFkQA1&LLw2^CTLMBK|J_#NJf6Zaw7p#wrn|y;b)8 zFSPBe;$q&ush;QO?a{Z{-DOpx9xw&^-uH$GwA_V!KJ`A$XJ%{-FMJ~7-d?ULHXssU z(UDsCMjpI0^uCjSEE%4VrEj3V&t~tA*hQyxlIAUaTC>IRP{xF;4IeKr%F7Ps5Ck}C+95-x%&=4$a#@%aR)Vg@k>=6H6#;*>% zYFQWK2FK@6SpHI(e>X+poVd9nha$8|G6gTL#jFh^XkO4N5a+p<*J;EUcC#b{y*>Ue zlAAQEmQFOVw{I$1kFwwVUL`HBYf7$_rL3G()U2pT7|2`^?fNg736;#j5v3JaM39Y> zPqe{Lk&-`K9^nVlN00C72j16Tu3PzjtzY8