From 34ed705dc6246e7fb732fb71fe6c7359dbbb37e7 Mon Sep 17 00:00:00 2001 From: James South Date: Mon, 10 Nov 2014 10:20:14 +0000 Subject: [PATCH] Cleanup Former-commit-id: 13d6072a5070024926e14e2508f88fb93306587e Former-commit-id: 3b66d353393a27e50840e3aea98efa3b4259ad95 --- .../Helpers/ImageHelpers.cs | 5 --- src/ImageProcessor/ImageFactory.cs | 40 +++++++++---------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/src/ImageProcessor.Web/Helpers/ImageHelpers.cs b/src/ImageProcessor.Web/Helpers/ImageHelpers.cs index 3ba8a56fc..fee71b606 100644 --- a/src/ImageProcessor.Web/Helpers/ImageHelpers.cs +++ b/src/ImageProcessor.Web/Helpers/ImageHelpers.cs @@ -29,11 +29,6 @@ namespace ImageProcessor.Web.Helpers /// public static readonly string ExtensionRegexPattern = BuildExtensionRegexPattern(); - /// - /// The regex for matching the format to ignore when parsing image extensions. - /// - private static readonly Regex FormatProcessorRegex = new Regex(@"format=[\w+-]+.", RegexOptions.IgnoreCase); - /// /// The image format regex. /// diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index 8e8a1d396..82fb586f4 100644 --- a/src/ImageProcessor/ImageFactory.cs +++ b/src/ImageProcessor/ImageFactory.cs @@ -299,26 +299,6 @@ namespace ImageProcessor return this; } - /// - /// Crops an image to the area of greatest entropy. - /// - /// - /// The threshold in bytes to control the entropy. - /// - /// - /// The current instance of the class. - /// - public ImageFactory EntropyCrop(byte threshold = 128) - { - if (this.ShouldProcess) - { - EntropyCrop autoCrop = new EntropyCrop { DynamicParameter = threshold }; - this.CurrentImageFormat.ApplyProcessor(autoCrop.ProcessImage, this); - } - - return this; - } - /// /// Performs auto-rotation to ensure that EXIF defined rotation is reflected in /// the final image. @@ -495,6 +475,26 @@ namespace ImageProcessor return this; } + /// + /// Crops an image to the area of greatest entropy. + /// + /// + /// The threshold in bytes to control the entropy. + /// + /// + /// The current instance of the class. + /// + public ImageFactory EntropyCrop(byte threshold = 128) + { + if (this.ShouldProcess) + { + EntropyCrop autoCrop = new EntropyCrop { DynamicParameter = threshold }; + this.CurrentImageFormat.ApplyProcessor(autoCrop.ProcessImage, this); + } + + return this; + } + /// /// Applies a filter to the current image. Use the class to /// assign the correct filter.