Simplify image processing by removing image enhancers

This commit is contained in:
Bond_009
2020-01-21 20:26:30 +01:00
parent d4de78693f
commit ddf9b38799
13 changed files with 103 additions and 522 deletions

View File

@@ -1,36 +1,43 @@
using System.Globalization;
namespace MediaBrowser.Model.Drawing
{
/// <summary>
/// Struct ImageDimensions
/// </summary>
public struct ImageDimensions
public readonly struct ImageDimensions
{
/// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
public int Height { get; set; }
public ImageDimensions(int width, int height)
{
Width = width;
Height = height;
}
/// <summary>
/// Gets or sets the width.
/// Gets the height.
/// </summary>
/// <value>The height.</value>
public int Height { get; }
/// <summary>
/// Gets the width.
/// </summary>
/// <value>The width.</value>
public int Width { get; set; }
public int Width { get; }
public bool Equals(ImageDimensions size)
{
return Width.Equals(size.Width) && Height.Equals(size.Height);
}
/// <inheritdoc />
public override string ToString()
{
return string.Format("{0}-{1}", Width, Height);
}
public ImageDimensions(int width, int height)
{
Width = width;
Height = height;
return string.Format(
CultureInfo.InvariantCulture,
"{0}-{1}",
Width,
Height);
}
}
}