public void Grayscale_VaryingBitColorDepths_ShouldSucceed(string expectedFile, string actualFile) { using (Bitmap expected = new Bitmap(Image.FromFile(expectedFile))) { SUT.FastBitmap actual = SUT.FastBitmap.FromFile(actualFile); TestUtil.AssertContentsEqual(expected, actual.Grayscale().Content); } }
public void Blur_ValidParams_ShouldSucceed(double sigma, int weight, string input, string expectedOutput) { using (Bitmap expected = (Bitmap)Image.FromFile(expectedOutput)) { SUT.FastBitmap actual = SUT.FastBitmap.FromFile(input).Blur(sigma, weight); actual.Content.Save("ayy.png"); TestUtil.AssertContentsEqual(expected, actual.Content); } }
public static void PerformLockingOperation(this FastBitmap bitmap, FastBitmap.LockingDataOperation operation) { FastBitmap.PerformLockingOperation(bitmap.Content, operation); }