//--------------------------------------------- //------------------ Task2 -------------------- #region Image processing private void button3_Click(object sender, EventArgs e) { //Image processing load file button if (openFileDialog1.ShowDialog() == DialogResult.OK) { InputImage = new Bitmap(Bitmap.FromFile(openFileDialog1.FileName), Bitmap.FromFile(openFileDialog1.FileName).Size.Width, Bitmap.FromFile(openFileDialog1.FileName).Size.Height); InputImage = Gray.ImageGrayscale(InputImage); pictureBox2.Image = InputImage; loadf = true; } }