From df4676022e9cf29f41b6472d6322cdf6bdb8d3a1 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 1 May 2017 14:54:33 +1000 Subject: [PATCH] Fix frame delay getting copied over --- src/ImageSharp/Image/ImageFrame{TPixel}.cs | 10 ++++++++++ src/ImageSharp/Image/Image{TPixel}.cs | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Image/ImageFrame{TPixel}.cs b/src/ImageSharp/Image/ImageFrame{TPixel}.cs index e502950d0..0731b1443 100644 --- a/src/ImageSharp/Image/ImageFrame{TPixel}.cs +++ b/src/ImageSharp/Image/ImageFrame{TPixel}.cs @@ -30,6 +30,16 @@ namespace ImageSharp { } + /// + /// Initializes a new instance of the class. + /// + /// The image to create the frame from. + public ImageFrame(ImageFrame image) + : base(image) + { + this.CopyProperties(image); + } + /// /// Initializes a new instance of the class. /// diff --git a/src/ImageSharp/Image/Image{TPixel}.cs b/src/ImageSharp/Image/Image{TPixel}.cs index f49943b53..9e103c700 100644 --- a/src/ImageSharp/Image/Image{TPixel}.cs +++ b/src/ImageSharp/Image/Image{TPixel}.cs @@ -79,7 +79,6 @@ namespace ImageSharp public Image(ImageBase other) : base(other) { - this.MetaData = new ImageMetaData(); } /// @@ -107,7 +106,7 @@ namespace ImageSharp /// /// Gets the meta data of the image. /// - public ImageMetaData MetaData { get; private set; } + public ImageMetaData MetaData { get; private set; } = new ImageMetaData(); /// /// Gets the width of the image in inches. It is calculated as the width of the image