Browse Source

Fix weight count

Helps mitigate halo bug with gifs.


Former-commit-id: 9307909acd7eb38e5a6c722c2f1ce2c949ca4a9c
Former-commit-id: 7e53310efb4390de53880066e1798c5e77cdd649
Former-commit-id: 4bd4a70b5a3c64f39dd95203d8ad8bf31a394b11
af/merge-core
James Jackson-South 10 years ago
parent
commit
2ea3c2bc3f
  1. 2
      src/ImageProcessor/Samplers/Resampler.cs
  2. 8
      tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs
  3. 1
      tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs

2
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;
}

8
tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs

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

1
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() },

Loading…
Cancel
Save