From d72f0d84f515d78c3a3a5593bec9fbff5910a333 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: 5c64dfc9a3087dd2d0dc2a5b9f36e1f9d6811a4d Former-commit-id: a667ca7654216b2ddd8c89fba84d868d5c03c9f8 --- 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; }