Example #1
0
        public void TestRainbowFilter()
        {
            //get images from Resources
            Bitmap testImage  = Properties.Resources.original_wide;
            Bitmap realResult = Properties.Resources.original_wide_rainbow;

            //apply filter on test image
            Bitmap result = ExtBitmap.ApplyRainbowFilter(testImage);

            //get Hash from images
            string resultImageHash     = TestFunctions.GetImageHash(result);
            string realResultImageHash = TestFunctions.GetImageHash(realResult);

            //comparison
            Assert.AreEqual(resultImageHash, realResultImageHash);
        }
        public void TestPrewitt()
        {
            //get images from Resources
            Bitmap testImage  = Properties.Resources.original;
            Bitmap realResult = Properties.Resources.original_prewitt;

            //apply filter on test image
            Bitmap result = ExtBitmap.PrewittFilter(testImage, false);

            //get Hash from images
            string resultImageHash     = TestFunctions.GetImageHash(result);
            string realResultImageHash = TestFunctions.GetImageHash(realResult);

            //comparison
            Assert.AreEqual(resultImageHash, realResultImageHash);
        }