mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Add color picker from main window (assa context menu or shortcut)
This commit is contained in:
parent
f9d42ead11
commit
58a1d69b7f
@ -2196,6 +2196,7 @@ $HorzAlign = Center
|
|||||||
public string GeneralApplyAssaOverrideTags { get; set; }
|
public string GeneralApplyAssaOverrideTags { get; set; }
|
||||||
public string GeneralSetAssaPosition { get; set; }
|
public string GeneralSetAssaPosition { get; set; }
|
||||||
public string GeneralSetAssaResolution { get; set; }
|
public string GeneralSetAssaResolution { get; set; }
|
||||||
|
public string GeneralColorPicker { get; set; }
|
||||||
public string GeneralTakeAutoBackup { get; set; }
|
public string GeneralTakeAutoBackup { get; set; }
|
||||||
public string GeneralHelp { get; set; }
|
public string GeneralHelp { get; set; }
|
||||||
|
|
||||||
@ -8933,6 +8934,12 @@ $HorzAlign = Center
|
|||||||
shortcuts.GeneralSetAssaResolution = subNode.InnerText;
|
shortcuts.GeneralSetAssaResolution = subNode.InnerText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subNode = node.SelectSingleNode("GeneralColorPicker");
|
||||||
|
if (subNode != null)
|
||||||
|
{
|
||||||
|
shortcuts.GeneralColorPicker = subNode.InnerText;
|
||||||
|
}
|
||||||
|
|
||||||
subNode = node.SelectSingleNode("GeneralTakeAutoBackup");
|
subNode = node.SelectSingleNode("GeneralTakeAutoBackup");
|
||||||
if (subNode != null)
|
if (subNode != null)
|
||||||
{
|
{
|
||||||
@ -10860,6 +10867,7 @@ $HorzAlign = Center
|
|||||||
textWriter.WriteElementString("GeneralApplyAssaOverrideTags", shortcuts.GeneralApplyAssaOverrideTags);
|
textWriter.WriteElementString("GeneralApplyAssaOverrideTags", shortcuts.GeneralApplyAssaOverrideTags);
|
||||||
textWriter.WriteElementString("GeneralSetAssaPosition", shortcuts.GeneralSetAssaPosition);
|
textWriter.WriteElementString("GeneralSetAssaPosition", shortcuts.GeneralSetAssaPosition);
|
||||||
textWriter.WriteElementString("GeneralSetAssaResolution", shortcuts.GeneralSetAssaResolution);
|
textWriter.WriteElementString("GeneralSetAssaResolution", shortcuts.GeneralSetAssaResolution);
|
||||||
|
textWriter.WriteElementString("GeneralColorPicker", shortcuts.GeneralColorPicker);
|
||||||
textWriter.WriteElementString("GeneralTakeAutoBackup", shortcuts.GeneralTakeAutoBackup);
|
textWriter.WriteElementString("GeneralTakeAutoBackup", shortcuts.GeneralTakeAutoBackup);
|
||||||
textWriter.WriteElementString("MainListViewRemoveTimeCodes", shortcuts.MainListViewRemoveTimeCodes);
|
textWriter.WriteElementString("MainListViewRemoveTimeCodes", shortcuts.MainListViewRemoveTimeCodes);
|
||||||
textWriter.WriteElementString("MainEditFixRTLViaUnicodeChars", shortcuts.MainEditFixRTLViaUnicodeChars);
|
textWriter.WriteElementString("MainEditFixRTLViaUnicodeChars", shortcuts.MainEditFixRTLViaUnicodeChars);
|
||||||
|
@ -46,7 +46,7 @@ namespace Nikse.SubtitleEdit.Forms.Assa
|
|||||||
private bool _loading = true;
|
private bool _loading = true;
|
||||||
private string _assaBox;
|
private string _assaBox;
|
||||||
private readonly Random _random = new Random();
|
private readonly Random _random = new Random();
|
||||||
private string _boxStyleName;
|
private readonly string _boxStyleName;
|
||||||
private int _top;
|
private int _top;
|
||||||
private int _bottom;
|
private int _bottom;
|
||||||
private int _left;
|
private int _left;
|
||||||
@ -57,7 +57,7 @@ namespace Nikse.SubtitleEdit.Forms.Assa
|
|||||||
private long _totalFrames;
|
private long _totalFrames;
|
||||||
private FileSystemWatcher _drawingFileWatcher;
|
private FileSystemWatcher _drawingFileWatcher;
|
||||||
private readonly Subtitle _wholeSubtitle;
|
private readonly Subtitle _wholeSubtitle;
|
||||||
private static bool _bt601Bt709On = false;
|
private static bool _bt601Bt709On = true;
|
||||||
|
|
||||||
public AssSetBackground(Subtitle subtitle, int[] selectedIndices, string videoFileName, VideoInfo videoInfo, double videoPositionSeconds)
|
public AssSetBackground(Subtitle subtitle, int[] selectedIndices, string videoFileName, VideoInfo videoInfo, double videoPositionSeconds)
|
||||||
{
|
{
|
||||||
|
2
src/ui/Forms/Assa/ImageColorPicker.Designer.cs
generated
2
src/ui/Forms/Assa/ImageColorPicker.Designer.cs
generated
@ -1,6 +1,6 @@
|
|||||||
namespace Nikse.SubtitleEdit.Forms.Assa
|
namespace Nikse.SubtitleEdit.Forms.Assa
|
||||||
{
|
{
|
||||||
partial class ImageColorPicker
|
sealed partial class ImageColorPicker
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Nikse.SubtitleEdit.Forms.Ocr;
|
using Nikse.SubtitleEdit.Forms.Ocr;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
|
||||||
namespace Nikse.SubtitleEdit.Forms.Assa
|
namespace Nikse.SubtitleEdit.Forms.Assa
|
||||||
{
|
{
|
||||||
public partial class ImageColorPicker : Form
|
public sealed partial class ImageColorPicker : Form
|
||||||
{
|
{
|
||||||
private readonly Bitmap _bitmap;
|
private readonly Bitmap _bitmap;
|
||||||
private bool _colorPickerOn = true;
|
private bool _colorPickerOn = true;
|
||||||
@ -32,6 +33,8 @@ namespace Nikse.SubtitleEdit.Forms.Assa
|
|||||||
|
|
||||||
Width = _bitmap.Width + 10;
|
Width = _bitmap.Width + 10;
|
||||||
Height = _bitmap.Height + (Height - pictureBoxImage.Height);
|
Height = _bitmap.Height + (Height - pictureBoxImage.Height);
|
||||||
|
|
||||||
|
Text = LanguageSettings.Current.ImageColorPicker.Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pictureBoxImage_MouseMove(object sender, MouseEventArgs e)
|
private void pictureBoxImage_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
67
src/ui/Forms/Main.Designer.cs
generated
67
src/ui/Forms/Main.Designer.cs
generated
@ -40,9 +40,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
||||||
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode4 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
|
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode1 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
|
||||||
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode5 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
|
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode2 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
|
||||||
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode6 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
|
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode3 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
|
||||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||||
this.labelStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
this.labelStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.toolStripSelected = new System.Windows.Forms.ToolStripStatusLabel();
|
this.toolStripSelected = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
@ -564,6 +564,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components);
|
this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||||
this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.colorPickerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
@ -2630,7 +2631,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.setPositionToolStripMenuItem,
|
this.setPositionToolStripMenuItem,
|
||||||
this.progressBarToolStripMenuItem,
|
this.progressBarToolStripMenuItem,
|
||||||
this.videoResolutionResamplerToolStripMenuItem,
|
this.videoResolutionResamplerToolStripMenuItem,
|
||||||
this.generateBackgroundBoxToolStripMenuItem});
|
this.generateBackgroundBoxToolStripMenuItem,
|
||||||
|
this.colorPickerToolStripMenuItem});
|
||||||
this.toolStripMenuItemAssaTools.Name = "toolStripMenuItemAssaTools";
|
this.toolStripMenuItemAssaTools.Name = "toolStripMenuItemAssaTools";
|
||||||
this.toolStripMenuItemAssaTools.Size = new System.Drawing.Size(284, 22);
|
this.toolStripMenuItemAssaTools.Size = new System.Drawing.Size(284, 22);
|
||||||
this.toolStripMenuItemAssaTools.Text = "ASSA tools";
|
this.toolStripMenuItemAssaTools.Text = "ASSA tools";
|
||||||
@ -3655,14 +3657,14 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
|
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
|
||||||
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(113, 27);
|
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(113, 27);
|
||||||
this.timeUpDownVideoPosition.TabIndex = 12;
|
this.timeUpDownVideoPosition.TabIndex = 12;
|
||||||
timeCode4.Hours = 0;
|
timeCode1.Hours = 0;
|
||||||
timeCode4.Milliseconds = 0;
|
timeCode1.Milliseconds = 0;
|
||||||
timeCode4.Minutes = 0;
|
timeCode1.Minutes = 0;
|
||||||
timeCode4.Seconds = 0;
|
timeCode1.Seconds = 0;
|
||||||
timeCode4.TimeSpan = System.TimeSpan.Parse("00:00:00");
|
timeCode1.TimeSpan = System.TimeSpan.Parse("00:00:00");
|
||||||
timeCode4.TotalMilliseconds = 0D;
|
timeCode1.TotalMilliseconds = 0D;
|
||||||
timeCode4.TotalSeconds = 0D;
|
timeCode1.TotalSeconds = 0D;
|
||||||
this.timeUpDownVideoPosition.TimeCode = timeCode4;
|
this.timeUpDownVideoPosition.TimeCode = timeCode1;
|
||||||
this.timeUpDownVideoPosition.UseVideoOffset = false;
|
this.timeUpDownVideoPosition.UseVideoOffset = false;
|
||||||
//
|
//
|
||||||
// buttonGotoSub
|
// buttonGotoSub
|
||||||
@ -3895,14 +3897,14 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
|
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
|
||||||
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(113, 27);
|
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(113, 27);
|
||||||
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
|
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
|
||||||
timeCode5.Hours = 0;
|
timeCode2.Hours = 0;
|
||||||
timeCode5.Milliseconds = 0;
|
timeCode2.Milliseconds = 0;
|
||||||
timeCode5.Minutes = 0;
|
timeCode2.Minutes = 0;
|
||||||
timeCode5.Seconds = 0;
|
timeCode2.Seconds = 0;
|
||||||
timeCode5.TimeSpan = System.TimeSpan.Parse("00:00:00");
|
timeCode2.TimeSpan = System.TimeSpan.Parse("00:00:00");
|
||||||
timeCode5.TotalMilliseconds = 0D;
|
timeCode2.TotalMilliseconds = 0D;
|
||||||
timeCode5.TotalSeconds = 0D;
|
timeCode2.TotalSeconds = 0D;
|
||||||
this.timeUpDownVideoPositionAdjust.TimeCode = timeCode5;
|
this.timeUpDownVideoPositionAdjust.TimeCode = timeCode2;
|
||||||
this.timeUpDownVideoPositionAdjust.UseVideoOffset = false;
|
this.timeUpDownVideoPositionAdjust.UseVideoOffset = false;
|
||||||
//
|
//
|
||||||
// buttonAdjustSetEndTime
|
// buttonAdjustSetEndTime
|
||||||
@ -5122,14 +5124,14 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
||||||
this.timeUpDownStartTime.Size = new System.Drawing.Size(113, 27);
|
this.timeUpDownStartTime.Size = new System.Drawing.Size(113, 27);
|
||||||
this.timeUpDownStartTime.TabIndex = 0;
|
this.timeUpDownStartTime.TabIndex = 0;
|
||||||
timeCode6.Hours = 0;
|
timeCode3.Hours = 0;
|
||||||
timeCode6.Milliseconds = 0;
|
timeCode3.Milliseconds = 0;
|
||||||
timeCode6.Minutes = 0;
|
timeCode3.Minutes = 0;
|
||||||
timeCode6.Seconds = 0;
|
timeCode3.Seconds = 0;
|
||||||
timeCode6.TimeSpan = System.TimeSpan.Parse("00:00:00");
|
timeCode3.TimeSpan = System.TimeSpan.Parse("00:00:00");
|
||||||
timeCode6.TotalMilliseconds = 0D;
|
timeCode3.TotalMilliseconds = 0D;
|
||||||
timeCode6.TotalSeconds = 0D;
|
timeCode3.TotalSeconds = 0D;
|
||||||
this.timeUpDownStartTime.TimeCode = timeCode6;
|
this.timeUpDownStartTime.TimeCode = timeCode3;
|
||||||
this.timeUpDownStartTime.UseVideoOffset = false;
|
this.timeUpDownStartTime.UseVideoOffset = false;
|
||||||
//
|
//
|
||||||
// numericUpDownDuration
|
// numericUpDownDuration
|
||||||
@ -5437,6 +5439,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.mediaPlayer.SubtitleText = "";
|
this.mediaPlayer.SubtitleText = "";
|
||||||
this.mediaPlayer.TabIndex = 5;
|
this.mediaPlayer.TabIndex = 5;
|
||||||
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
|
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
|
this.mediaPlayer.UsingFrontCenterAudioChannelOnly = false;
|
||||||
this.mediaPlayer.VideoHeight = 0;
|
this.mediaPlayer.VideoHeight = 0;
|
||||||
this.mediaPlayer.VideoPlayer = null;
|
this.mediaPlayer.VideoPlayer = null;
|
||||||
this.mediaPlayer.VideoWidth = 0;
|
this.mediaPlayer.VideoWidth = 0;
|
||||||
@ -5499,6 +5502,13 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.toolStripMenuItemShowVideoControls.Text = "Show video controls";
|
this.toolStripMenuItemShowVideoControls.Text = "Show video controls";
|
||||||
this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.toolStripMenuItemShowVideoControls_Click);
|
this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.toolStripMenuItemShowVideoControls_Click);
|
||||||
//
|
//
|
||||||
|
// colorPickerToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.colorPickerToolStripMenuItem.Name = "colorPickerToolStripMenuItem";
|
||||||
|
this.colorPickerToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
|
||||||
|
this.colorPickerToolStripMenuItem.Text = "Color picker...";
|
||||||
|
this.colorPickerToolStripMenuItem.Click += new System.EventHandler(this.colorPickerToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// Main
|
// Main
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -6107,5 +6117,6 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private System.Windows.Forms.ToolStripButton toolStripButtonBurnIn;
|
private System.Windows.Forms.ToolStripButton toolStripButtonBurnIn;
|
||||||
private System.Windows.Forms.ToolStripButton toolStripButtonSpellCheck;
|
private System.Windows.Forms.ToolStripButton toolStripButtonSpellCheck;
|
||||||
private System.Windows.Forms.ToolStripMenuItem wordListsToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem wordListsToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem colorPickerToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1821,6 +1821,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
progressBarToolStripMenuItem.Text = _language.Menu.ContextMenu.GenerateProgressBar;
|
progressBarToolStripMenuItem.Text = _language.Menu.ContextMenu.GenerateProgressBar;
|
||||||
videoResolutionResamplerToolStripMenuItem.Text = _language.Menu.ContextMenu.AssaResolutionChanger;
|
videoResolutionResamplerToolStripMenuItem.Text = _language.Menu.ContextMenu.AssaResolutionChanger;
|
||||||
generateBackgroundBoxToolStripMenuItem.Text = _language.Menu.ContextMenu.AssaGenerateBackgroundBox;
|
generateBackgroundBoxToolStripMenuItem.Text = _language.Menu.ContextMenu.AssaGenerateBackgroundBox;
|
||||||
|
colorPickerToolStripMenuItem.Text = _language.Menu.ContextMenu.ImageColorPicker;
|
||||||
|
|
||||||
toolStripMenuItemDelete.Text = _language.Menu.ContextMenu.Delete;
|
toolStripMenuItemDelete.Text = _language.Menu.ContextMenu.Delete;
|
||||||
insertLineToolStripMenuItem.Text = _language.Menu.ContextMenu.InsertFirstLine;
|
insertLineToolStripMenuItem.Text = _language.Menu.ContextMenu.InsertFirstLine;
|
||||||
@ -24803,6 +24804,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
translateToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateAuto);
|
translateToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateAuto);
|
||||||
applyCustomStylesToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralApplyAssaOverrideTags);
|
applyCustomStylesToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralApplyAssaOverrideTags);
|
||||||
setPositionToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralSetAssaPosition);
|
setPositionToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralSetAssaPosition);
|
||||||
|
colorPickerToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralColorPicker);
|
||||||
|
|
||||||
audioVisualizer.InsertAtVideoPositionShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainWaveformInsertAtCurrentPosition);
|
audioVisualizer.InsertAtVideoPositionShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainWaveformInsertAtCurrentPosition);
|
||||||
audioVisualizer.Move100MsLeft = UiUtil.GetKeys(Configuration.Settings.Shortcuts.Waveform100MsLeft);
|
audioVisualizer.Move100MsLeft = UiUtil.GetKeys(Configuration.Settings.Shortcuts.Waveform100MsLeft);
|
||||||
@ -34309,5 +34311,42 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
form.ShowDialog(this);
|
form.ShowDialog(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void colorPickerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_videoFileName))
|
||||||
|
{
|
||||||
|
MessageBox.Show(_languageGeneral.NoVideoLoaded);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Cursor = Cursors.WaitCursor;
|
||||||
|
var timeCode = new TimeCode(mediaPlayer.CurrentPosition * 1000.0 + 1000).ToHHMMSS();
|
||||||
|
var colorMatrix = "bt601:bt709"; // ffmpeg bug with assa color?
|
||||||
|
var bmpFileName = VideoPreviewGenerator.GetScreenShot(_videoFileName, timeCode, colorMatrix);
|
||||||
|
using (var bmp = new Bitmap(bmpFileName))
|
||||||
|
{
|
||||||
|
Cursor = Cursors.Default;
|
||||||
|
using (var form = new ImageColorPicker(bmp))
|
||||||
|
{
|
||||||
|
if (form.ShowDialog(this) != DialogResult.OK)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorChooser.SetLastColor(form.Color);
|
||||||
|
ShowStatus(string.Format(LanguageSettings.Current.AssaSetBackgroundBox.ColorPickerSetLastColor, Utilities.ColorToHexWithTransparency(form.Color)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_filesToDelete.Add(bmpFileName);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Cursor = Cursors.Default;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -715,9 +715,6 @@
|
|||||||
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>652, 56</value>
|
<value>652, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>652, 56</value>
|
|
||||||
</metadata>
|
|
||||||
<data name="toolStripButtonWaveformZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="toolStripButtonWaveformZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
@ -813,12 +810,12 @@
|
|||||||
<metadata name="imageListBookmarks.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="imageListBookmarks.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>981, 56</value>
|
<value>981, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="contextMenuStripTextBoxSourceView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>193, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="contextMenuStripTextBoxListView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="contextMenuStripTextBoxListView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>668, 17</value>
|
<value>668, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="contextMenuStripTextBoxSourceView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>193, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="contextMenuStripEmpty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="contextMenuStripEmpty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 95</value>
|
<value>17, 95</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@ -830,7 +827,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAZwBLQGcAS0BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAaQBLQGkAS0BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
@ -1279,6 +1279,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
|||||||
AddNode(generalNode, language.ApplyAssaOverrideTags, nameof(Configuration.Settings.Shortcuts.GeneralApplyAssaOverrideTags), true);
|
AddNode(generalNode, language.ApplyAssaOverrideTags, nameof(Configuration.Settings.Shortcuts.GeneralApplyAssaOverrideTags), true);
|
||||||
AddNode(generalNode, language.SetAssaPosition, nameof(Configuration.Settings.Shortcuts.GeneralSetAssaPosition), true);
|
AddNode(generalNode, language.SetAssaPosition, nameof(Configuration.Settings.Shortcuts.GeneralSetAssaPosition), true);
|
||||||
AddNode(generalNode, language.SetAssaResolution, nameof(Configuration.Settings.Shortcuts.GeneralSetAssaResolution));
|
AddNode(generalNode, language.SetAssaResolution, nameof(Configuration.Settings.Shortcuts.GeneralSetAssaResolution));
|
||||||
|
AddNode(generalNode, LanguageSettings.Current.ImageColorPicker.Title, nameof(Configuration.Settings.Shortcuts.GeneralColorPicker));
|
||||||
AddNode(generalNode, language.TakeAutoBackup, nameof(Configuration.Settings.Shortcuts.GeneralTakeAutoBackup));
|
AddNode(generalNode, language.TakeAutoBackup, nameof(Configuration.Settings.Shortcuts.GeneralTakeAutoBackup));
|
||||||
AddNode(generalNode, language.Help, nameof(Configuration.Settings.Shortcuts.GeneralHelp), true);
|
AddNode(generalNode, language.Help, nameof(Configuration.Settings.Shortcuts.GeneralHelp), true);
|
||||||
_shortcuts.Nodes.Add(generalNode);
|
_shortcuts.Nodes.Add(generalNode);
|
||||||
|
@ -23,6 +23,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
public LanguageStructure.AssaOverrideTags AssaOverrideTags;
|
public LanguageStructure.AssaOverrideTags AssaOverrideTags;
|
||||||
public LanguageStructure.AssaProgressBarGenerator AssaProgressBarGenerator;
|
public LanguageStructure.AssaProgressBarGenerator AssaProgressBarGenerator;
|
||||||
public LanguageStructure.AssaResulationChanger AssaResulationChanger;
|
public LanguageStructure.AssaResulationChanger AssaResulationChanger;
|
||||||
|
public LanguageStructure.ImageColorPicker ImageColorPicker;
|
||||||
public LanguageStructure.AssaSetBackgroundBox AssaSetBackgroundBox;
|
public LanguageStructure.AssaSetBackgroundBox AssaSetBackgroundBox;
|
||||||
public LanguageStructure.AssaSetPosition AssaSetPosition;
|
public LanguageStructure.AssaSetPosition AssaSetPosition;
|
||||||
public LanguageStructure.AutoBreakUnbreakLines AutoBreakUnbreakLines;
|
public LanguageStructure.AutoBreakUnbreakLines AutoBreakUnbreakLines;
|
||||||
@ -389,6 +390,11 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
SourceAndTargetEqual = "Source and target resolution is the same - nothing to do.",
|
SourceAndTargetEqual = "Source and target resolution is the same - nothing to do.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ImageColorPicker = new LanguageStructure.ImageColorPicker
|
||||||
|
{
|
||||||
|
Title = "Image color picker",
|
||||||
|
};
|
||||||
|
|
||||||
AssaSetBackgroundBox = new LanguageStructure.AssaSetBackgroundBox
|
AssaSetBackgroundBox = new LanguageStructure.AssaSetBackgroundBox
|
||||||
{
|
{
|
||||||
Title = "Generate background box",
|
Title = "Generate background box",
|
||||||
@ -1945,6 +1951,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
GenerateProgressBar = "Generate progress bar...",
|
GenerateProgressBar = "Generate progress bar...",
|
||||||
AssaResolutionChanger = "Change ASSA script resolution...",
|
AssaResolutionChanger = "Change ASSA script resolution...",
|
||||||
AssaGenerateBackgroundBox = "Generate background box...",
|
AssaGenerateBackgroundBox = "Generate background box...",
|
||||||
|
ImageColorPicker = "Image color picker...",
|
||||||
FixCommonErrorsInSelectedLines = "Fix common errors in selected lines...",
|
FixCommonErrorsInSelectedLines = "Fix common errors in selected lines...",
|
||||||
ChangeCasingForSelectedLines = "Change casing for selected lines...",
|
ChangeCasingForSelectedLines = "Change casing for selected lines...",
|
||||||
SaveSelectedLines = "Save selected lines as...",
|
SaveSelectedLines = "Save selected lines as...",
|
||||||
|
@ -247,6 +247,11 @@
|
|||||||
public string SourceAndTargetEqual { get; set; }
|
public string SourceAndTargetEqual { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ImageColorPicker
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class AssaSetBackgroundBox
|
public class AssaSetBackgroundBox
|
||||||
{
|
{
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
@ -1790,6 +1795,7 @@
|
|||||||
public string GenerateProgressBar { get; set; }
|
public string GenerateProgressBar { get; set; }
|
||||||
public string AssaResolutionChanger { get; set; }
|
public string AssaResolutionChanger { get; set; }
|
||||||
public string AssaGenerateBackgroundBox { get; set; }
|
public string AssaGenerateBackgroundBox { get; set; }
|
||||||
|
public string ImageColorPicker { get; set; }
|
||||||
public string FixCommonErrorsInSelectedLines { get; set; }
|
public string FixCommonErrorsInSelectedLines { get; set; }
|
||||||
public string ChangeCasingForSelectedLines { get; set; }
|
public string ChangeCasingForSelectedLines { get; set; }
|
||||||
public string SaveSelectedLines { get; set; }
|
public string SaveSelectedLines { get; set; }
|
||||||
|
Loading…
Reference in New Issue
Block a user