public static void FloydSteinbergDitheringAndSave(string sourceFilePath, byte[,] sourceImage) { byte[,] resultImage = ImageHalftoning.FloydSteinbergDithering(sourceImage); string newFilePath = ProbA3.NewFilePath(sourceFilePath, "FloydSteinbergDithering"); Utility.SaveGrayscaleImage(resultImage, newFilePath); Console.WriteLine($"Floyd-Steinberg dithering done and saved to \'{newFilePath}\'"); }
public static void RandomDitheringAndSave(string sourceFilePath, byte[,] sourceImage) { byte[,] resultImage = ImageHalftoning.RandomDithering(sourceImage, new Random()); string newFilePath = ProbA3.NewFilePath(sourceFilePath, "RandomDithering"); Utility.SaveGrayscaleImage(resultImage, newFilePath); Console.WriteLine($"Random dithering done and saved to \'{newFilePath}\'"); }
public static void ErrorDiffusionDitheringDefaultAndSave(string sourceFilePath, byte[,] sourceImage) { byte[,] resultImage = ImageHalftoning.ErrorDiffusionDitheringDefault(sourceImage); string newFilePath = ProbA3.NewFilePath(sourceFilePath, "ErrorDiffusionDitheringDefault"); Utility.SaveGrayscaleImage(resultImage, newFilePath); Console.WriteLine($"Error diffusion dithering done and saved to \'{newFilePath}\'"); }
public static void JarvisJudiceNinkeDitheringAndSave(string sourceFilePath, byte[,] sourceImage) { byte[,] resultImage = ImageHalftoning.JarvisJudiceNinkeDithering(sourceImage); string newFilePath = ProbA3.NewFilePath(sourceFilePath, "JarvisJudiceNinkeDithering"); Utility.SaveGrayscaleImage(resultImage, newFilePath); Console.WriteLine($"Jarvis, Judice & Ninke dithering done and saved to \'{newFilePath}\'"); }