Browse Source

Faster cleanup

Former-commit-id: acc249f3ebad10bfe62fa2259951349cd4f428f4
Former-commit-id: 5879f79d9f536b5e23a14c8513d010800234a2de
pull/17/head
James South 11 years ago
parent
commit
7ffd6214ba
  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 // Search for the first white pixels
Rectangle rectangle = ImageMaths.GetFilteredBoundingRectangle(grey, 0); Rectangle rectangle = ImageMaths.GetFilteredBoundingRectangle(grey, 0);
grey.Dispose();
newImage = new Bitmap(rectangle.Width, rectangle.Height); newImage = new Bitmap(rectangle.Width, rectangle.Height);
newImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); newImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
@ -80,7 +81,6 @@ namespace ImageProcessor.Processors
} }
// Reassign the image. // Reassign the image.
grey.Dispose();
image.Dispose(); image.Dispose();
image = newImage; image = newImage;
} }

Loading…
Cancel
Save