Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Bitmap originalImage = (Bitmap)Image.FromFile(openFile.FileName);
            Bitmap comingImage   = null;

            switch (comboBox1.SelectedItem)
            {
            case "negatif":
                comingImage = processes.Negative((Bitmap)originalImage);
                break;

            case "gri":
                comingImage = processes.ConvertGray((Bitmap)originalImage);
                break;

            case "eşikleme":
                comingImage = processes.ConvertGray((Bitmap)originalImage);
                comingImage = processes.Thresholding((Bitmap)originalImage, 128);
                break;

            case "parlaklık":
                comingImage = processes.Brightness((Bitmap)originalImage, trackBar1.Value);
                break;
            }
            pictureBox2.Image = comingImage;
        }