diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-02-21 12:32:54 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-21 12:32:54 +0900 |
| commit | 61015c1d0f1e3c8521f3cd107fb979eb1b47b008 (patch) | |
| tree | 10c35c884846f39cbe855e1f059da2b8be6eaf0f /MediaBrowser.Model/Drawing/ImageDimensions.cs | |
| parent | 28cc210a5e8f6fc234178f2f667d8ce1f8596dec (diff) | |
| parent | a2490a7ae5c636d97085a0e950fbbe1a027bfdb0 (diff) | |
Merge pull request #2321 from Bond-009/images
Simplify image processing by removing image enhancers
Diffstat (limited to 'MediaBrowser.Model/Drawing/ImageDimensions.cs')
| -rw-r--r-- | MediaBrowser.Model/Drawing/ImageDimensions.cs | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/MediaBrowser.Model/Drawing/ImageDimensions.cs b/MediaBrowser.Model/Drawing/ImageDimensions.cs index b546dbb25..160be11f0 100644 --- a/MediaBrowser.Model/Drawing/ImageDimensions.cs +++ b/MediaBrowser.Model/Drawing/ImageDimensions.cs @@ -1,39 +1,46 @@ #pragma warning disable CS1591 #pragma warning disable SA1600 +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); } } } |
