From ddf9b38799fa4a0e227ae3c2516a72ec48f13854 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 21 Jan 2020 20:26:30 +0100 Subject: Simplify image processing by removing image enhancers --- MediaBrowser.Model/Drawing/ImageDimensions.cs | 31 ++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'MediaBrowser.Model/Drawing/ImageDimensions.cs') 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 { /// /// Struct ImageDimensions /// - public struct ImageDimensions + public readonly struct ImageDimensions { + public ImageDimensions(int width, int height) + { + Width = width; + Height = height; + } + /// - /// Gets or sets the height. + /// Gets the height. /// /// The height. - public int Height { get; set; } + public int Height { get; } /// - /// Gets or sets the width. + /// Gets the width. /// /// The width. - public int Width { get; set; } + public int Width { get; } public bool Equals(ImageDimensions size) { return Width.Equals(size.Width) && Height.Equals(size.Height); } + /// 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); } } } -- cgit v1.2.3