Browse Source

Attempt to weight calc cleanup [skip ci]

Former-commit-id: 485d047c26116a779df451cc5b6e908aaf458245
Former-commit-id: 5d60473dbdc50f4ea1a3f9a7259285195b2508e7
Former-commit-id: 63bcdaa96ad9327b223a4052fb16e26b69372f64
pull/1/head
James Jackson-South 10 years ago
parent
commit
45925000ac
  1. 12
      tests/ImageProcessorCore.Tests/FileTestBase.cs
  2. 5
      tests/ImageProcessorCore.Tests/Processors/Samplers/ResizeTests.cs
  3. BIN
      tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pd.png
  4. BIN
      tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pl.png

12
tests/ImageProcessorCore.Tests/FileTestBase.cs

@ -19,18 +19,20 @@ namespace ImageProcessorCore.Tests
/// </summary>
protected static readonly List<string> Files = new List<string>
{
"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
};

5
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);
}
}

BIN
tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
tests/ImageProcessorCore.Tests/TestImages/Formats/Png/pl.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Loading…
Cancel
Save