aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Drawing/ImageDimensions.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-01-21 20:26:30 +0100
committerBond_009 <bond.009@outlook.com>2020-01-21 20:26:30 +0100
commitddf9b38799fa4a0e227ae3c2516a72ec48f13854 (patch)
treeaf1c9abdff0b91026c7917e0e966efcd139f41fa /MediaBrowser.Model/Drawing/ImageDimensions.cs
parentd4de78693fcaf97aa5a94124b35e4d6145bdfa55 (diff)
Simplify image processing by removing image enhancers
Diffstat (limited to 'MediaBrowser.Model/Drawing/ImageDimensions.cs')
-rw-r--r--MediaBrowser.Model/Drawing/ImageDimensions.cs31
1 files changed, 19 insertions, 12 deletions
diff --git a/MediaBrowser.Model/Drawing/ImageDimensions.cs b/MediaBrowser.Model/Drawing/ImageDimensions.cs
index e7805ac49..4bd8d85d4 100644
--- a/MediaBrowser.Model/Drawing/ImageDimensions.cs
+++ b/MediaBrowser.Model/Drawing/ImageDimensions.cs
@@ -1,36 +1,43 @@
+using System.Globalization;
+
namespace MediaBrowser.Model.Drawing
{
/// <summary>
/// Struct ImageDimensions
/// </summary>
- public struct ImageDimensions
+ public readonly struct ImageDimensions
{
+ public ImageDimensions(int width, int height)
+ {
+ Width = width;
+ Height = height;
+ }
+
/// <summary>
- /// Gets or sets the height.
+ /// Gets the height.
/// </summary>
/// <value>The height.</value>
- public int Height { get; set; }
+ public int Height { get; }
/// <summary>
- /// Gets or sets the width.
+ /// 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);
}
}
}