Browse Source

Fix weight count

Helps mitigate halo bug with gifs.


Former-commit-id: 3a23d972fbb8fa09977e2303065ca61d96f6f1d6
Former-commit-id: 4ec8909f0aef656426ef5d0a3d88f41a51b5a308
Former-commit-id: fe652e796cb6d052deb7c682cde01522c43c0631
pull/17/head
James Jackson-South 11 years ago
parent
commit
4250fe94ea
  1. 2
      src/ImageProcessor/Samplers/Resampler.cs
  2. 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 du = sourceSize / (float)destinationSize;
float scale = du; float scale = du;
if (scale < 1) if (scale > 1)
{ {
scale = 1; scale = 1;
} }

1
tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs

@ -15,6 +15,7 @@
{ {
{ "Bicubic", new BicubicResampler() }, { "Bicubic", new BicubicResampler() },
{ "Triangle", new TriangleResampler() }, { "Triangle", new TriangleResampler() },
// Perf: Enable for local testing only
//{ "Box", new BoxResampler() }, //{ "Box", new BoxResampler() },
//{ "Lanczos3", new Lanczos3Resampler() }, //{ "Lanczos3", new Lanczos3Resampler() },
//{ "Lanczos5", new Lanczos5Resampler() }, //{ "Lanczos5", new Lanczos5Resampler() },

Loading…
Cancel
Save