From 3234c421c2df594d327b9ab720e83b5925e3714a Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 20 Jun 2016 21:27:56 +1000 Subject: [PATCH] Use initialisers Former-commit-id: a5eb29bea83d28d3c9bc92de5a1d4b8470056080 Former-commit-id: 21d12461725dc1843f9b25f5b0ec3a17da4c8206 Former-commit-id: c71bd070ad88c4b41c7fe6bd44f2c54b1b5d1724 --- src/ImageProcessorCore/Image.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/ImageProcessorCore/Image.cs b/src/ImageProcessorCore/Image.cs index acef0c4d3f..c454db506b 100644 --- a/src/ImageProcessorCore/Image.cs +++ b/src/ImageProcessorCore/Image.cs @@ -42,8 +42,6 @@ namespace ImageProcessorCore /// public Image() { - this.HorizontalResolution = DefaultHorizontalResolution; - this.VerticalResolution = DefaultVerticalResolution; this.CurrentImageFormat = Bootstrapper.Instance.ImageFormats.First(f => f.GetType() == typeof(PngFormat)); } @@ -56,8 +54,6 @@ namespace ImageProcessorCore public Image(int width, int height) : base(width, height) { - this.HorizontalResolution = DefaultHorizontalResolution; - this.VerticalResolution = DefaultVerticalResolution; this.CurrentImageFormat = Bootstrapper.Instance.ImageFormats.First(f => f.GetType() == typeof(PngFormat)); } @@ -97,9 +93,6 @@ namespace ImageProcessorCore public Image(ImageFrame other) : base(other) { - this.HorizontalResolution = DefaultHorizontalResolution; - this.VerticalResolution = DefaultVerticalResolution; - // Most likely a gif // TODO: Should this be aproperty on ImageFrame? this.CurrentImageFormat = Bootstrapper.Instance.ImageFormats.First(f => f.GetType() == typeof(GifFormat)); @@ -140,10 +133,10 @@ namespace ImageProcessorCore public IReadOnlyCollection Formats { get; internal set; } = Bootstrapper.Instance.ImageFormats; /// - public double HorizontalResolution { get; set; } + public double HorizontalResolution { get; set; } = DefaultHorizontalResolution; /// - public double VerticalResolution { get; set; } + public double VerticalResolution { get; set; } = DefaultVerticalResolution; /// public double InchWidth