From 45925000ac35f6ce40b1777accf08a7f80019d29 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sun, 7 Aug 2016 19:38:10 +1000 Subject: [PATCH] Attempt to weight calc cleanup [skip ci] Former-commit-id: 485d047c26116a779df451cc5b6e908aaf458245 Former-commit-id: 5d60473dbdc50f4ea1a3f9a7259285195b2508e7 Former-commit-id: 63bcdaa96ad9327b223a4052fb16e26b69372f64 --- tests/ImageProcessorCore.Tests/FileTestBase.cs | 12 +++++++----- .../Processors/Samplers/ResizeTests.cs | 5 +++-- .../TestImages/Formats/Png/pd.png | Bin 0 -> 1406 bytes .../TestImages/Formats/Png/pl.png | Bin 0 -> 91 bytes 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pd.png create mode 100644 tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pl.png diff --git a/tests/ImageProcessorCore.Tests/FileTestBase.cs b/tests/ImageProcessorCore.Tests/FileTestBase.cs index 53a7620ab7..48758f4d96 100644 --- a/tests/ImageProcessorCore.Tests/FileTestBase.cs +++ b/tests/ImageProcessorCore.Tests/FileTestBase.cs @@ -19,18 +19,20 @@ namespace ImageProcessorCore.Tests /// protected static readonly List Files = new List { + "TestImages/Formats/Png/pl.png", + "TestImages/Formats/Png/pd.png", //"TestImages/Formats/Jpg/Floorplan.jpeg", // Perf: Enable for local testing only - "TestImages/Formats/Jpg/Calliphora.jpg", - "TestImages/Formats/Jpg/turtle.jpg", + //"TestImages/Formats/Jpg/Calliphora.jpg", + //"TestImages/Formats/Jpg/turtle.jpg", //"TestImages/Formats/Jpg/fb.jpg", // Perf: Enable for local testing only //"TestImages/Formats/Jpg/progress.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/Bmp/Car.bmp", // "TestImages/Formats/Bmp/neg_height.bmp", // Perf: Enable for local testing only //"TestImages/Formats/Png/blur.png", // Perf: Enable for local testing only //"TestImages/Formats/Png/indexed.png", // Perf: Enable for local testing only - "TestImages/Formats/Png/splash.png", - "TestImages/Formats/Gif/rings.gif", + //TestImages/Formats/Png/splash.png", + //"TestImages/Formats/Gif/rings.gif", //"TestImages/Formats/Gif/giphy.gif" // Perf: Enable for local testing only }; diff --git a/tests/ImageProcessorCore.Tests/Processors/Samplers/ResizeTests.cs b/tests/ImageProcessorCore.Tests/Processors/Samplers/ResizeTests.cs index c905fb51ce..fdd5496cb3 100644 --- a/tests/ImageProcessorCore.Tests/Processors/Samplers/ResizeTests.cs +++ b/tests/ImageProcessorCore.Tests/Processors/Samplers/ResizeTests.cs @@ -24,7 +24,7 @@ namespace ImageProcessorCore.Tests //{ "Lanczos3", new Lanczos3Resampler() }, //{ "Lanczos5", new Lanczos5Resampler() }, //{ "Lanczos8", new Lanczos8Resampler() }, - //{ "MitchellNetravali", new MitchellNetravaliResampler() }, + { "MitchellNetravali", new MitchellNetravaliResampler() }, //{ "Hermite", new HermiteResampler() }, //{ "Spline", new SplineResampler() }, //{ "Robidoux", new RobidouxResampler() }, @@ -51,7 +51,8 @@ namespace ImageProcessorCore.Tests Image image = new Image(stream); using (FileStream output = File.OpenWrite($"{path}/{filename}")) { - image.Resize(image.Width / 2, image.Height / 2, sampler, true, this.ProgressUpdate) + //image.Resize(image.Width / 2, image.Height / 2, sampler, true, this.ProgressUpdate) + image.Resize(555, 15, sampler, true, this.ProgressUpdate) .Save(output); } } diff --git a/tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pd.png b/tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pd.png new file mode 100644 index 0000000000000000000000000000000000000000..e06399fbb85c44534b220e27e84ad5079f42d6a9 GIT binary patch literal 1406 zcmeAS@N?(olHy`uVBq!ia0y~yVA5q^U=-$H0*aIhFHB`%V0HC$aSW-L^Y+f^T1BItIsaF&fYMo+!8E-_U4JJ@BVn>5R788j-VGh=ZMlJ1h?cE4iJLqK;e^U?L$`I_0``;|m%YF9bO|C-bS z4z#K-S4{7GWnAzimJb|tI79AIy7iVyXb|-J{GCixP+KiN}eu`AsQ2tO^l3^4ltLn4Qm-9r0UE!&sH(0iVFOaIZpgFw{`p00i_>zopr0HEC&s{jB1 literal 0 HcmV?d00001