Exemple #1
0
        private void Filter_Gamma(object sender, System.EventArgs e)
        {
            GammaInput dlg = new GammaInput();

            if (DialogResult.OK == dlg.ShowDialog())
            {
                pictureBox2.Image = BitmapFilter.Gamma(m_Bitmap, dlg.gams);
                pictureBox2.Refresh();
                pictureBox2.Invalidate();
                SetHistogram(2);
            }
        }
Exemple #2
0
        private void Filter_Gamma(object sender, System.EventArgs e)
        {
            GammaInput dlg = new GammaInput();

            dlg.red = dlg.green = dlg.blue = 1;

            if (DialogResult.OK == dlg.ShowDialog())
            {
                m_Undo = (Bitmap)m_Bitmap.Clone();
                if (BitmapFilter.Gamma(m_Bitmap, dlg.red, dlg.green, dlg.blue))
                {
                    this.Invalidate();
                }
            }
        }
Exemple #3
0
        private double[] GetGammaInput()
        {
            GammaInput dlg = new GammaInput();

            dlg.red = dlg.green = dlg.blue = 1;
            double[] gamma = new double[3];
            if (DialogResult.OK == dlg.ShowDialog())
            {
                gamma[0] = dlg.red;
                gamma[1] = dlg.green;
                gamma[2] = dlg.blue;
                this.Invalidate();
            }
            return(gamma);
        }