From a14c94b441d7290c10fa247d5e725d60daa02e19 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 24 May 2018 21:09:56 +1000 Subject: [PATCH] Always clear the buffer --- src/ImageSharp/ImageFrame{TPixel}.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ImageSharp/ImageFrame{TPixel}.cs b/src/ImageSharp/ImageFrame{TPixel}.cs index f1fff473e..0caacd8a8 100644 --- a/src/ImageSharp/ImageFrame{TPixel}.cs +++ b/src/ImageSharp/ImageFrame{TPixel}.cs @@ -87,13 +87,8 @@ namespace SixLabors.ImageSharp this.configuration = configuration; this.MemoryManager = configuration.MemoryManager; this.PixelBuffer = this.MemoryManager.Allocate2D(width, height, false); - - if (!default(TPixel).Equals(backgroundColor)) - { - this.Clear(configuration.ParallelOptions, backgroundColor); - } - this.MetaData = metaData; + this.Clear(configuration.ParallelOptions, backgroundColor); } ///