public void ShouldThrowExceptionWhenStopColorIsNull() { using (var image = new MagickImage()) { Assert.Throws <ArgumentNullException>("stopColor", () => image.ColorThreshold(new MagickColor(), null)); } }
public void ShouldChangeTheImageToBlackAndWhite() { using (var image = new MagickImage(Files.FujiFilmFinePixS1ProPNG)) { var startColor = MagickColor.FromRgb(60, 110, 150); var stopColor = MagickColor.FromRgb(70, 120, 170); image.ColorThreshold(startColor, stopColor); ColorAssert.Equal(MagickColors.White, image, 300, 160); ColorAssert.Equal(MagickColors.Black, image, 300, 260); } }
public void ShouldThrowExceptionWhenStartColorIsNull() { using (IMagickImage image = new MagickImage()) { ExceptionAssert.Throws <ArgumentNullException>("startColor", () => image.ColorThreshold(null, new MagickColor())); } }