public Bitmap ToGrayscaleRMY(Bitmap Im) { AForge.Imaging.Filters.GrayscaleRMY Img = new GrayscaleRMY(); Bitmap bmImage = AForge.Imaging.Image.Clone(new Bitmap(Im), PixelFormat.Format24bppRgb); return(Img.Apply(bmImage)); }
private void grayScaleRMYToolStripMenuItem_Click(object sender, EventArgs e) { GrayscaleRMY rmyobject = new GrayscaleRMY(); pictureBox2.Image = rmyobject.Apply((Bitmap)pictureBox1.Image); }