Browse Source

Faster cleanup

Former-commit-id: 5c64dfc9a3087dd2d0dc2a5b9f36e1f9d6811a4d
Former-commit-id: a667ca7654216b2ddd8c89fba84d868d5c03c9f8
pull/17/head
James South 11 years ago
parent
commit
d72f0d84f5
  1. 2
      src/ImageProcessor/Processors/EntropyCrop.cs

2
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;
}

Loading…
Cancel
Save