Browse Source

ResizeTests working with CalliphoraPartial.png

af/merge-core
Anton Firszov 9 years ago
parent
commit
5b40a9f438
  1. 6
      tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs
  2. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Bicubic.png
  3. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Box.png
  4. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Hermite.png
  5. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos3.png
  6. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos5.png
  7. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos8.png
  8. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_MitchellNetravali.png
  9. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_NearestNeighbor.png
  10. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Robidoux.png
  11. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_RobidouxSharp.png
  12. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Spline.png
  13. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Triangle.png
  14. 3
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Welch.png
  15. 1
      tests/ImageSharp.Tests/TestImages.cs
  16. 3
      tests/ImageSharp.Tests/TestImages/Formats/Png/CalliphoraPartial.png
  17. 1
      tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs
  18. 1
      tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

6
tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs

@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Transforms
public class ResizeTests : FileTestBase
{
public static readonly string[] ResizeFiles = { TestImages.Jpeg.Baseline.Calliphora };
public static readonly string[] ResizeFiles = { TestImages.Png.CalliphoraPartial };
public static readonly TheoryData<string, IResampler> ReSamplers =
new TheoryData<string, IResampler>
@ -40,7 +40,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> image = provider.GetImage())
{
image.Resize(image.Width / 2, image.Height / 2, sampler, true)
.CompareToReferenceOutput(provider, name);
.DebugSave(provider, name);
}
}
@ -51,7 +51,7 @@ namespace ImageSharp.Tests.Processing.Transforms
{
using (Image<TPixel> image = provider.GetImage())
{
var sourceRectangle = new Rectangle(image.Width / 8, image.Height / 8, image.Width / 4, image.Height / 4);
var sourceRectangle = new Rectangle(image.Width / 4, image.Height / 4, image.Width / 4, image.Height / 4);
var destRectangle = new Rectangle(image.Width / 4, image.Height / 4, image.Width / 2, image.Height / 2);
image.Resize(image.Width, image.Height, sampler, sourceRectangle, destRectangle, false)

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Bicubic.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:70469b88029e09c8ae5342ffe0fdeaab640d6d5aec8f1e9c2e0c66fdc540ac95
size 447170

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Box.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66ea88b72f5281872f7745f8a9fc52524c56374134276320e33c7a1289a136b7
size 450534

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Hermite.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2caaf6c168c900dbfc1984cf4309032ced4f8c4b8274d2dacfdec8d29fdbd9d5
size 431023

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos3.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de905f2be709c191fec7fdd659f4f36f65022ebc7286c291d91dab8980e24fb6
size 458942

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos5.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c91056290a6fca55673c959540ee329de1f501e3943b7cd2c8b31be119f835ae
size 464896

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos8.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f31d0e0e35c19812dfdaecb400e2a3348f8ebd19ae61b6f4310bdab2fdf8ed8c
size 469121

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_MitchellNetravali.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ff82fe20b547f5e20c6d4c40266b856a38a94e1ef5e870478fcf9a81221aaa2d
size 429460

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_NearestNeighbor.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4f84095fde69319ec1e2b052ad62228e46565b0e3aa99ebcc635f4be9349d8e9
size 467253

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Robidoux.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a723e94408e446fffc44ce80016fbb463c7014ca90bf352bfe5da425572fbc77
size 426904

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_RobidouxSharp.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7c190fc65290277ed7805961fc8625b68ca98bbd1445802c104e990901ebcbc
size 432999

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Spline.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8bb323798907fe4b0145a64b57d06ea42726b7acbb7f03fdff9b59e0d572941c
size 390539

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Triangle.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:214df91833d4fdf8f0940a62645070093bf00b13fcb3748407526414a9c504bb
size 418080

3
tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Welch.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:78b9122639130418d8589718674b979315dd21d7fe25c07794f9cd8475ac99e0
size 460956

1
tests/ImageSharp.Tests/TestImages.cs

@ -26,6 +26,7 @@ namespace ImageSharp.Tests
public const string SplashInterlaced = "Png/splash-interlaced.png";
public const string Interlaced = "Png/interlaced.png";
public const string Rgb48Bpp = "Png/rgb-48bpp.png";
public const string CalliphoraPartial = "Png/CalliphoraPartial.png";
// Filtered test images from http://www.schaik.com/pngsuite/pngsuite_fil_png.html
public const string Filter0 = "Png/filter0.png";

3
tests/ImageSharp.Tests/TestImages/Formats/Png/CalliphoraPartial.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1ddd702463bf22e52cdf185c0c9c98f97531ffce67700ec48a391f5a9d8f2c97
size 331346

1
tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs

@ -142,6 +142,7 @@ namespace ImageSharp.Tests
encoder = encoder ?? format.Encoder;
using (FileStream stream = File.OpenWrite(path))
{
image.Save(stream, encoder, options);

1
tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

@ -33,6 +33,7 @@ namespace ImageSharp.Tests
return image;
}
// We are running locally then we want to save it out
provider.Utility.SaveTestOutputFile(image, extension, settings: settings);
return image;

Loading…
Cancel
Save