Browse Source

Use initialisers

Former-commit-id: a5eb29bea83d28d3c9bc92de5a1d4b8470056080
Former-commit-id: 21d12461725dc1843f9b25f5b0ec3a17da4c8206
Former-commit-id: c71bd070ad88c4b41c7fe6bd44f2c54b1b5d1724
pull/1/head
James Jackson-South 10 years ago
parent
commit
3234c421c2
  1. 11
      src/ImageProcessorCore/Image.cs

11
src/ImageProcessorCore/Image.cs

@ -42,8 +42,6 @@ namespace ImageProcessorCore
/// </summary>
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<IImageFormat> Formats { get; internal set; } = Bootstrapper.Instance.ImageFormats;
/// <inheritdoc/>
public double HorizontalResolution { get; set; }
public double HorizontalResolution { get; set; } = DefaultHorizontalResolution;
/// <inheritdoc/>
public double VerticalResolution { get; set; }
public double VerticalResolution { get; set; } = DefaultVerticalResolution;
/// <inheritdoc/>
public double InchWidth

Loading…
Cancel
Save