public static Bitmap PosterizeFilter(Bitmap bmp, byte posterizationInterval = 150) { SimplePosterization filter = new SimplePosterization(); filter.PosterizationInterval = posterizationInterval; return(filter.Apply(bmp)); }
public Bitmap ToSimplePosterization(Bitmap Im) { AForge.Imaging.Filters.SimplePosterization Img = new SimplePosterization(); Bitmap bmImage = AForge.Imaging.Image.Clone(new Bitmap(Im), PixelFormat.Format24bppRgb); return(Img.Apply(bmImage)); }
public static void Start() { Bitmap bmp = Image.FromFile(PATH + @"\test.png") as Bitmap; SimplePosterization filter = new SimplePosterization(); filter.PosterizationInterval = 150; Bitmap newBmp = filter.Apply(bmp); newBmp.Save(PATH + @"\outtest.png"); }
public static void Load() { Bitmap bmp = Image.FromFile(PATH + @"\health2.jpg") as Bitmap; SimplePosterization filter = new SimplePosterization(); filter.PosterizationInterval = 150; Bitmap newBmp = filter.Apply(bmp); newBmp.Save(PATH + @"\out2.png"); }
private void btn_filter2_Click(object sender, EventArgs e) { AForge.Imaging.Filters.SimplePosterization filter = new SimplePosterization(); pictureBox1.Image = filter.Apply((Bitmap)pictureBox1.Image); }
public Bitmap PosterizationFilter(Bitmap img) { SimplePosterization filter = new SimplePosterization(); return(filter.Apply(img)); }