diff --git a/src/ImageProcessor/Processors/Resize.cs b/src/ImageProcessor/Processors/Resize.cs index 606b058a9..6187156b3 100644 --- a/src/ImageProcessor/Processors/Resize.cs +++ b/src/ImageProcessor/Processors/Resize.cs @@ -356,7 +356,7 @@ namespace ImageProcessor.Processors bool reject = true; foreach (Size restrictedSize in restrictedSizes) { - if (restrictedSize.Width == width || restrictedSize.Height == height) + if (restrictedSize.Width == width && restrictedSize.Height == height) { reject = false; } @@ -593,8 +593,14 @@ namespace ImageProcessor.Processors /// private List ParseRestrictions(string input) { - string[] splitInput = input.Split(','); - return splitInput.Select(this.ParseSize).ToList(); + List sizes = new List(); + + if (!string.IsNullOrWhiteSpace(input)) + { + sizes.AddRange(input.Split(',').Select(this.ParseSize)); + } + + return sizes; } } } diff --git a/src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config b/src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config index 0479642b2..5f864d3e4 100644 --- a/src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config +++ b/src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config @@ -30,6 +30,7 @@ +