mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
ImageBeautifierForm improvements
This commit is contained in:
parent
b7bb8d7fe0
commit
2ec6429270
11 changed files with 359 additions and 133 deletions
101
ShareX.MediaLib/Forms/ImageBeautifierForm.Designer.cs
generated
101
ShareX.MediaLib/Forms/ImageBeautifierForm.Designer.cs
generated
|
@ -43,9 +43,14 @@ private void InitializeComponent()
|
||||||
this.lblRoundedCornerValue = new System.Windows.Forms.Label();
|
this.lblRoundedCornerValue = new System.Windows.Forms.Label();
|
||||||
this.lblShadowSizeValue = new System.Windows.Forms.Label();
|
this.lblShadowSizeValue = new System.Windows.Forms.Label();
|
||||||
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
||||||
this.pOptions = new System.Windows.Forms.Panel();
|
|
||||||
this.pbBackground = new System.Windows.Forms.PictureBox();
|
|
||||||
this.pbPreview = new ShareX.HelpersLib.MyPictureBox();
|
this.pbPreview = new ShareX.HelpersLib.MyPictureBox();
|
||||||
|
this.pOptions = new System.Windows.Forms.Panel();
|
||||||
|
this.btnPrint = new System.Windows.Forms.Button();
|
||||||
|
this.btnSave = new System.Windows.Forms.Button();
|
||||||
|
this.btnUpload = new System.Windows.Forms.Button();
|
||||||
|
this.btnSaveAs = new System.Windows.Forms.Button();
|
||||||
|
this.btnCopy = new System.Windows.Forms.Button();
|
||||||
|
this.pbBackground = new System.Windows.Forms.PictureBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.tbMargin)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.tbMargin)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.tbPadding)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.tbPadding)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.tbRoundedCorner)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.tbRoundedCorner)).BeginInit();
|
||||||
|
@ -216,8 +221,28 @@ private void InitializeComponent()
|
||||||
this.tlpMain.Size = new System.Drawing.Size(1384, 761);
|
this.tlpMain.Size = new System.Drawing.Size(1384, 761);
|
||||||
this.tlpMain.TabIndex = 15;
|
this.tlpMain.TabIndex = 15;
|
||||||
//
|
//
|
||||||
|
// pbPreview
|
||||||
|
//
|
||||||
|
this.pbPreview.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.pbPreview.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.pbPreview.DrawCheckeredBackground = true;
|
||||||
|
this.pbPreview.EnableRightClickMenu = true;
|
||||||
|
this.pbPreview.FullscreenOnClick = true;
|
||||||
|
this.pbPreview.Location = new System.Drawing.Point(335, 0);
|
||||||
|
this.pbPreview.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.pbPreview.Name = "pbPreview";
|
||||||
|
this.pbPreview.PictureBoxBackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.pbPreview.ShowImageSizeLabel = true;
|
||||||
|
this.pbPreview.Size = new System.Drawing.Size(1049, 761);
|
||||||
|
this.pbPreview.TabIndex = 12;
|
||||||
|
//
|
||||||
// pOptions
|
// pOptions
|
||||||
//
|
//
|
||||||
|
this.pOptions.Controls.Add(this.btnPrint);
|
||||||
|
this.pOptions.Controls.Add(this.btnSave);
|
||||||
|
this.pOptions.Controls.Add(this.btnUpload);
|
||||||
|
this.pOptions.Controls.Add(this.btnSaveAs);
|
||||||
|
this.pOptions.Controls.Add(this.btnCopy);
|
||||||
this.pOptions.Controls.Add(this.pbBackground);
|
this.pOptions.Controls.Add(this.pbBackground);
|
||||||
this.pOptions.Controls.Add(this.lblMargin);
|
this.pOptions.Controls.Add(this.lblMargin);
|
||||||
this.pOptions.Controls.Add(this.lblShadowSizeValue);
|
this.pOptions.Controls.Add(this.lblShadowSizeValue);
|
||||||
|
@ -239,6 +264,60 @@ private void InitializeComponent()
|
||||||
this.pOptions.Size = new System.Drawing.Size(329, 755);
|
this.pOptions.Size = new System.Drawing.Size(329, 755);
|
||||||
this.pOptions.TabIndex = 0;
|
this.pOptions.TabIndex = 0;
|
||||||
//
|
//
|
||||||
|
// btnPrint
|
||||||
|
//
|
||||||
|
this.btnPrint.Image = global::ShareX.MediaLib.Properties.Resources.printer;
|
||||||
|
this.btnPrint.Location = new System.Drawing.Point(264, 696);
|
||||||
|
this.btnPrint.Name = "btnPrint";
|
||||||
|
this.btnPrint.Size = new System.Drawing.Size(56, 48);
|
||||||
|
this.btnPrint.TabIndex = 19;
|
||||||
|
this.btnPrint.UseVisualStyleBackColor = true;
|
||||||
|
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
|
||||||
|
//
|
||||||
|
// btnSave
|
||||||
|
//
|
||||||
|
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.btnSave.Image = global::ShareX.MediaLib.Properties.Resources.disk_black;
|
||||||
|
this.btnSave.Location = new System.Drawing.Point(72, 696);
|
||||||
|
this.btnSave.Name = "btnSave";
|
||||||
|
this.btnSave.Size = new System.Drawing.Size(56, 48);
|
||||||
|
this.btnSave.TabIndex = 18;
|
||||||
|
this.btnSave.UseVisualStyleBackColor = true;
|
||||||
|
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||||
|
//
|
||||||
|
// btnUpload
|
||||||
|
//
|
||||||
|
this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.btnUpload.Image = global::ShareX.MediaLib.Properties.Resources.upload_cloud;
|
||||||
|
this.btnUpload.Location = new System.Drawing.Point(200, 696);
|
||||||
|
this.btnUpload.Name = "btnUpload";
|
||||||
|
this.btnUpload.Size = new System.Drawing.Size(56, 48);
|
||||||
|
this.btnUpload.TabIndex = 17;
|
||||||
|
this.btnUpload.UseVisualStyleBackColor = true;
|
||||||
|
this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click);
|
||||||
|
//
|
||||||
|
// btnSaveAs
|
||||||
|
//
|
||||||
|
this.btnSaveAs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.btnSaveAs.Image = global::ShareX.MediaLib.Properties.Resources.disks_black;
|
||||||
|
this.btnSaveAs.Location = new System.Drawing.Point(136, 696);
|
||||||
|
this.btnSaveAs.Name = "btnSaveAs";
|
||||||
|
this.btnSaveAs.Size = new System.Drawing.Size(56, 48);
|
||||||
|
this.btnSaveAs.TabIndex = 16;
|
||||||
|
this.btnSaveAs.UseVisualStyleBackColor = true;
|
||||||
|
this.btnSaveAs.Click += new System.EventHandler(this.btnSaveAs_Click);
|
||||||
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
this.btnCopy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.btnCopy.Image = global::ShareX.MediaLib.Properties.Resources.document_copy;
|
||||||
|
this.btnCopy.Location = new System.Drawing.Point(8, 696);
|
||||||
|
this.btnCopy.Name = "btnCopy";
|
||||||
|
this.btnCopy.Size = new System.Drawing.Size(56, 48);
|
||||||
|
this.btnCopy.TabIndex = 15;
|
||||||
|
this.btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
|
||||||
|
//
|
||||||
// pbBackground
|
// pbBackground
|
||||||
//
|
//
|
||||||
this.pbBackground.Cursor = System.Windows.Forms.Cursors.Hand;
|
this.pbBackground.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
@ -249,18 +328,6 @@ private void InitializeComponent()
|
||||||
this.pbBackground.TabStop = false;
|
this.pbBackground.TabStop = false;
|
||||||
this.pbBackground.Click += new System.EventHandler(this.pbBackground_Click);
|
this.pbBackground.Click += new System.EventHandler(this.pbBackground_Click);
|
||||||
//
|
//
|
||||||
// pbPreview
|
|
||||||
//
|
|
||||||
this.pbPreview.BackColor = System.Drawing.SystemColors.Window;
|
|
||||||
this.pbPreview.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.pbPreview.DrawCheckeredBackground = true;
|
|
||||||
this.pbPreview.Location = new System.Drawing.Point(335, 0);
|
|
||||||
this.pbPreview.Margin = new System.Windows.Forms.Padding(0);
|
|
||||||
this.pbPreview.Name = "pbPreview";
|
|
||||||
this.pbPreview.PictureBoxBackColor = System.Drawing.SystemColors.Window;
|
|
||||||
this.pbPreview.Size = new System.Drawing.Size(1049, 761);
|
|
||||||
this.pbPreview.TabIndex = 12;
|
|
||||||
//
|
|
||||||
// ImageBeautifierForm
|
// ImageBeautifierForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||||
|
@ -269,6 +336,7 @@ private void InitializeComponent()
|
||||||
this.Controls.Add(this.tlpMain);
|
this.Controls.Add(this.tlpMain);
|
||||||
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
this.MinimumSize = new System.Drawing.Size(1000, 600);
|
||||||
this.Name = "ImageBeautifierForm";
|
this.Name = "ImageBeautifierForm";
|
||||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
@ -305,5 +373,10 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.Panel pOptions;
|
private System.Windows.Forms.Panel pOptions;
|
||||||
private HelpersLib.MyPictureBox pbPreview;
|
private HelpersLib.MyPictureBox pbPreview;
|
||||||
private System.Windows.Forms.PictureBox pbBackground;
|
private System.Windows.Forms.PictureBox pbBackground;
|
||||||
|
private System.Windows.Forms.Button btnSave;
|
||||||
|
private System.Windows.Forms.Button btnUpload;
|
||||||
|
private System.Windows.Forms.Button btnSaveAs;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
|
private System.Windows.Forms.Button btnPrint;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,12 +36,12 @@ public partial class ImageBeautifierForm : Form
|
||||||
public Bitmap SourceImage { get; private set; }
|
public Bitmap SourceImage { get; private set; }
|
||||||
public Bitmap PreviewImage { get; private set; }
|
public Bitmap PreviewImage { get; private set; }
|
||||||
public ImageBeautifierOptions Options { get; private set; }
|
public ImageBeautifierOptions Options { get; private set; }
|
||||||
|
public string FilePath { get; private set; }
|
||||||
|
|
||||||
private bool isReady, isBusy, isPending;
|
private bool isReady, isBusy, isPending;
|
||||||
|
|
||||||
public ImageBeautifierForm(Bitmap sourceImage, ImageBeautifierOptions options = null)
|
private ImageBeautifierForm(ImageBeautifierOptions options = null)
|
||||||
{
|
{
|
||||||
SourceImage = sourceImage;
|
|
||||||
Options = options;
|
Options = options;
|
||||||
|
|
||||||
if (Options == null)
|
if (Options == null)
|
||||||
|
@ -63,6 +63,17 @@ public ImageBeautifierForm(Bitmap sourceImage, ImageBeautifierOptions options =
|
||||||
isReady = true;
|
isReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImageBeautifierForm(Bitmap sourceImage, ImageBeautifierOptions options = null) : this(options)
|
||||||
|
{
|
||||||
|
SourceImage = sourceImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageBeautifierForm(string filePath, ImageBeautifierOptions options = null) : this(options)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
SourceImage = ImageHelpers.LoadImage(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateUI()
|
private void UpdateUI()
|
||||||
{
|
{
|
||||||
lblMarginValue.Text = tbMargin.Value.ToString();
|
lblMarginValue.Text = tbMargin.Value.ToString();
|
||||||
|
@ -190,6 +201,45 @@ private async void tbRoundedCorner_Scroll(object sender, EventArgs e)
|
||||||
await UpdatePreview();
|
await UpdatePreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnCopy_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (PreviewImage != null)
|
||||||
|
{
|
||||||
|
ClipboardHelpers.CopyImage(PreviewImage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (PreviewImage != null && !string.IsNullOrEmpty(FilePath))
|
||||||
|
{
|
||||||
|
ImageHelpers.SaveImage(PreviewImage, FilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnSaveAs_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (PreviewImage != null)
|
||||||
|
{
|
||||||
|
string filePath = ImageHelpers.SaveImageFileDialog(PreviewImage, FilePath);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(filePath))
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnUpload_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnPrint_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private async void tbShadowSize_Scroll(object sender, EventArgs e)
|
private async void tbShadowSize_Scroll(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
await UpdatePreview();
|
await UpdatePreview();
|
||||||
|
|
52
ShareX.MediaLib/Properties/Resources.Designer.cs
generated
52
ShareX.MediaLib/Properties/Resources.Designer.cs
generated
|
@ -19,7 +19,7 @@ namespace ShareX.MediaLib.Properties {
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Resources {
|
internal class Resources {
|
||||||
|
@ -114,6 +114,36 @@ internal static string AlignmentVerticalCenter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap disk_black {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("disk-black", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap disks_black {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("disks-black", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap document_copy {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("document-copy", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to FFmpeg error.
|
/// Looks up a localized string similar to FFmpeg error.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -141,6 +171,16 @@ internal static string LowerQualitySize {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap printer {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("printer", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Start encoding.
|
/// Looks up a localized string similar to Start encoding.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -168,6 +208,16 @@ internal static string ThumbnailsSuccessfullyGenerated {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap upload_cloud {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("upload-cloud", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Browse for media file.
|
/// Looks up a localized string similar to Browse for media file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,117 +1,146 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 1.3
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">1.3</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1">this is my long string</data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
[base64 mime encoded serialized .NET Framework object]
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
</data>
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="data">
|
<xsd:element name="metadata">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
</xsd:sequence>
|
||||||
</xsd:sequence>
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="assembly">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
</xsd:sequence>
|
</xsd:complexType>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
</xsd:element>
|
||||||
</xsd:complexType>
|
<xsd:element name="data">
|
||||||
</xsd:element>
|
<xsd:complexType>
|
||||||
</xsd:choice>
|
<xsd:sequence>
|
||||||
</xsd:complexType>
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
</xsd:element>
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:schema>
|
</xsd:sequence>
|
||||||
<resheader name="resmimetype">
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
<value>text/microsoft-resx</value>
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
</resheader>
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
<resheader name="version">
|
<xsd:attribute ref="xml:space" />
|
||||||
<value>1.3</value>
|
</xsd:complexType>
|
||||||
</resheader>
|
</xsd:element>
|
||||||
<resheader name="reader">
|
<xsd:element name="resheader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<xsd:complexType>
|
||||||
</resheader>
|
<xsd:sequence>
|
||||||
<resheader name="writer">
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
</xsd:sequence>
|
||||||
</resheader>
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
<data name="VideoThumbnailerForm_btnBrowse_Click_Browse_for_media_file" xml:space="preserve">
|
</xsd:complexType>
|
||||||
<value>Browse for media file</value>
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="document-copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\document-copy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ThumbnailsSuccessfullyGenerated" xml:space="preserve">
|
<data name="ThumbnailsSuccessfullyGenerated" xml:space="preserve">
|
||||||
<value>Thumbnails successfully generated.</value>
|
<value>Thumbnails successfully generated.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LowerQualitySize" xml:space="preserve">
|
<data name="disks-black" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>Lower quality/size</value>
|
<value>..\Resources\disks-black.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="AlignmentTop" xml:space="preserve">
|
||||||
|
<value>Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="StopEncoding" xml:space="preserve">
|
||||||
|
<value>Stop encoding</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="HigherQualitySize" xml:space="preserve">
|
<data name="HigherQualitySize" xml:space="preserve">
|
||||||
<value>Higher quality/size</value>
|
<value>Higher quality/size</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StopEncoding" xml:space="preserve">
|
<data name="AlignmentBottom" xml:space="preserve">
|
||||||
<value>Stop encoding</value>
|
<value>Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="AlignmentRight" xml:space="preserve">
|
||||||
|
<value>Right</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StartEncoding" xml:space="preserve">
|
<data name="StartEncoding" xml:space="preserve">
|
||||||
<value>Start encoding</value>
|
<value>Start encoding</value>
|
||||||
|
@ -119,22 +148,28 @@
|
||||||
<data name="FFmpegError" xml:space="preserve">
|
<data name="FFmpegError" xml:space="preserve">
|
||||||
<value>FFmpeg error</value>
|
<value>FFmpeg error</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlignmentTop" xml:space="preserve">
|
<data name="AlignmentVerticalCenter" xml:space="preserve">
|
||||||
<value>Top</value>
|
|
||||||
</data>
|
|
||||||
<data name="AlignmentHorizontalCenter" xml:space="preserve">
|
|
||||||
<value>Center</value>
|
<value>Center</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlignmentBottom" xml:space="preserve">
|
<data name="upload-cloud" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>Bottom</value>
|
<value>..\Resources\upload-cloud.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="VideoThumbnailerForm_btnBrowse_Click_Browse_for_media_file" xml:space="preserve">
|
||||||
|
<value>Browse for media file</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlignmentLeft" xml:space="preserve">
|
<data name="AlignmentLeft" xml:space="preserve">
|
||||||
<value>Left</value>
|
<value>Left</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlignmentVerticalCenter" xml:space="preserve">
|
<data name="AlignmentHorizontalCenter" xml:space="preserve">
|
||||||
<value>Center</value>
|
<value>Center</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlignmentRight" xml:space="preserve">
|
<data name="LowerQualitySize" xml:space="preserve">
|
||||||
<value>Right</value>
|
<value>Lower quality/size</value>
|
||||||
|
</data>
|
||||||
|
<data name="disk-black" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\disk-black.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="printer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\printer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
BIN
ShareX.MediaLib/Resources/disk-black.png
Normal file
BIN
ShareX.MediaLib/Resources/disk-black.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 433 B |
BIN
ShareX.MediaLib/Resources/disks-black.png
Normal file
BIN
ShareX.MediaLib/Resources/disks-black.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 516 B |
BIN
ShareX.MediaLib/Resources/document-copy.png
Normal file
BIN
ShareX.MediaLib/Resources/document-copy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 564 B |
BIN
ShareX.MediaLib/Resources/printer.png
Normal file
BIN
ShareX.MediaLib/Resources/printer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 722 B |
BIN
ShareX.MediaLib/Resources/upload-cloud.png
Normal file
BIN
ShareX.MediaLib/Resources/upload-cloud.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -436,6 +436,21 @@
|
||||||
<EmbeddedResource Include="Properties\Resources.zh-CN.resx" />
|
<EmbeddedResource Include="Properties\Resources.zh-CN.resx" />
|
||||||
<EmbeddedResource Include="Properties\Resources.zh-TW.resx" />
|
<EmbeddedResource Include="Properties\Resources.zh-TW.resx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\document-copy.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\disk-black.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\disks-black.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\upload-cloud.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\printer.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -1019,7 +1019,10 @@ public static Bitmap AnnotateImage(Bitmap bmp, string filePath, TaskSettings tas
|
||||||
|
|
||||||
form.CopyImageRequested += output =>
|
form.CopyImageRequested += output =>
|
||||||
{
|
{
|
||||||
Program.MainForm.InvokeSafe(() => ClipboardHelpers.CopyImage(output));
|
Program.MainForm.InvokeSafe(() =>
|
||||||
|
{
|
||||||
|
ClipboardHelpers.CopyImage(output);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
form.UploadImageRequested += output =>
|
form.UploadImageRequested += output =>
|
||||||
|
@ -1061,11 +1064,11 @@ public static Bitmap AnnotateImage(Bitmap bmp, string filePath, TaskSettings tas
|
||||||
|
|
||||||
public static void OpenImageBeautifier()
|
public static void OpenImageBeautifier()
|
||||||
{
|
{
|
||||||
Bitmap sourceImage = ImageHelpers.LoadImageWithFileDialog();
|
string filePath = ImageHelpers.OpenImageFileDialog();
|
||||||
|
|
||||||
if (sourceImage != null)
|
if (!string.IsNullOrEmpty(filePath))
|
||||||
{
|
{
|
||||||
ImageBeautifierForm imageBeautifierForm = new ImageBeautifierForm(sourceImage);
|
ImageBeautifierForm imageBeautifierForm = new ImageBeautifierForm(filePath, new ImageBeautifierOptions());
|
||||||
imageBeautifierForm.Show();
|
imageBeautifierForm.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue