private void sobelToolStripMenuItem_Click(object sender, EventArgs e) { Bitmap bmp = new Bitmap(zoomPicBox1.Image.Width, zoomPicBox1.Image.Height); if (zoomPicBox1.Image != null) { ImageProcessing.SobelPointers(ImageProcessing.Grayscale(zoomPicBox1.Image), bmp, zoomPicBox1.Image.Width, zoomPicBox1.Image.Height); FormVisualizer viewResult = new FormVisualizer(FormVisualizer.DisplayMode.Form1, ""); viewResult.SetPicture(bmp); viewResult.Show(); } }
private void grayscaleToolStripMenuItem_Click(object sender, EventArgs e) { Bitmap bmp; if (zoomPicBox1.Image != null) { bmp = ImageProcessing.Grayscale(zoomPicBox1.Image); FormVisualizer form2 = new FormVisualizer(FormVisualizer.DisplayMode.Form1, ""); form2.SetPicture(bmp); form2.Show(); } }