Browse Source

ResizeTests working with CalliphoraPartial.png

pull/298/head
Anton Firszov 9 years ago
parent
commit
0136a6c121
  1. 6
      tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs
  2. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Bicubic.png
  3. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Box.png
  4. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Hermite.png
  5. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos3.png
  6. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos5.png
  7. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Lanczos8.png
  8. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_MitchellNetravali.png
  9. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_NearestNeighbor.png
  10. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Robidoux.png
  11. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_RobidouxSharp.png
  12. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Spline.png
  13. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Triangle.png
  14. BIN
      tests/ImageSharp.Tests/ReferenceOutput/ResizeTests/ImageShouldResize_Rgba32_Calliphora_Welch.png
  15. 1
      tests/ImageSharp.Tests/TestImages.cs
  16. BIN
      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)

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 KiB

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";

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

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