From 7ffd6214ba4e99ff49e4e59b50c5de06c14ed784 Mon Sep 17 00:00:00 2001 From: James South Date: Fri, 30 Jan 2015 22:54:38 +0000 Subject: [PATCH] Faster cleanup Former-commit-id: acc249f3ebad10bfe62fa2259951349cd4f428f4 Former-commit-id: 5879f79d9f536b5e23a14c8513d010800234a2de --- src/ImageProcessor/Processors/EntropyCrop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageProcessor/Processors/EntropyCrop.cs b/src/ImageProcessor/Processors/EntropyCrop.cs index 142600f34..ad6812643 100644 --- a/src/ImageProcessor/Processors/EntropyCrop.cs +++ b/src/ImageProcessor/Processors/EntropyCrop.cs @@ -64,6 +64,7 @@ namespace ImageProcessor.Processors // Search for the first white pixels Rectangle rectangle = ImageMaths.GetFilteredBoundingRectangle(grey, 0); + grey.Dispose(); newImage = new Bitmap(rectangle.Width, rectangle.Height); newImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); @@ -80,7 +81,6 @@ namespace ImageProcessor.Processors } // Reassign the image. - grey.Dispose(); image.Dispose(); image = newImage; }