diff --git a/src/ImageProcessor/Samplers/Resampler.cs b/src/ImageProcessor/Samplers/Resampler.cs index 835144ae7..b490a8203 100644 --- a/src/ImageProcessor/Samplers/Resampler.cs +++ b/src/ImageProcessor/Samplers/Resampler.cs @@ -327,7 +327,7 @@ namespace ImageProcessor.Samplers float du = sourceSize / (float)destinationSize; float scale = du; - if (scale < 1) + if (scale > 1) { scale = 1; } diff --git a/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs b/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs index dcb474f95..9a3e1181b 100644 --- a/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs +++ b/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs @@ -19,14 +19,14 @@ namespace ImageProcessor.Tests /// public static readonly List Files = new List { - //"TestImages/Formats/Jpg/Floorplan.jpeg", //Perf: Enable for local testing only + //"TestImages/Formats/Jpg/Floorplan.jpeg", // Perf: Enable for local testing only "TestImages/Formats/Jpg/Calliphora.jpg", - //"TestImages/Formats/Jpg/gamma_dalai_lama_gray.jpg", //Perf: Enable for local testing only + //"TestImages/Formats/Jpg/gamma_dalai_lama_gray.jpg", // Perf: Enable for local testing only "TestImages/Formats/Bmp/Car.bmp", - //"TestImages/Formats/Png/blur.png", //Perf: Enable for local testing only + //"TestImages/Formats/Png/blur.png", // Perf: Enable for local testing only "TestImages/Formats/Png/splash.png", "TestImages/Formats/Gif/rings.gif", - //"TestImages/Formats/Gif/giphy.gif" //Perf: Enable for local testing only + //"TestImages/Formats/Gif/giphy.gif" // Perf: Enable for local testing only }; } } diff --git a/tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs b/tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs index d60ab5139..04709b883 100644 --- a/tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs +++ b/tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs @@ -15,6 +15,7 @@ { { "Bicubic", new BicubicResampler() }, { "Triangle", new TriangleResampler() }, + // Perf: Enable for local testing only //{ "Box", new BoxResampler() }, //{ "Lanczos3", new Lanczos3Resampler() }, //{ "Lanczos5", new Lanczos5Resampler() },