Ejemplo n.º 1
0
 public void ScaleBy_ValidFactor_ShouldSucceed(ushort factor, string input, string expectedOutput)
 {
     using (Bitmap expected = (Bitmap)Image.FromFile(expectedOutput))
         using (SUT.FastBitmap actual = SUT.FastBitmap.FromFile(input))
         {
             TestUtil.AssertContentsEqual(expected, actual.ScaleBy(factor).Content);
         }
 }
Ejemplo n.º 2
0
 public void RadonTransform_ValidBitmap_ShouldSucceed()
 {
     using (SUT.FastBitmap input = SUT.FastBitmap.FromFile(FastBitmap.TestData1_KnownGood))
     {
         SUT.FastBitmap actual = input.ToGrayscale().Blur(1f, 5);
         actual = actual.ScaleBy(actual.Max()).Pow(2);
         actual.Content.Save("testing_before.png");
         actual.RadonTransform(actual.Content.Width).Transform.Content.Save("testing_after.png");
     }
 }