示例#1
0
        private void menuItemGamma_Click(object sender, EventArgs e)
        {
            GammaForm gFrm = new GammaForm();

            gFrm.RedComponent = gFrm.GreenComponent = gFrm.BlueComponent = 0;
            if (gFrm.ShowDialog() == DialogResult.OK)
            {
                this.Cursor = Cursors.WaitCursor;
                imageHandler.RestorePrevious();
                imageHandler.SetGamma(gFrm.RedComponent, gFrm.GreenComponent, gFrm.BlueComponent);
                this.Invalidate();
                this.Cursor = Cursors.Default;
            }
        }
        private void menuItemGamma_Click(object sender, EventArgs e)
        {
            var histForm = new Histograms();
            var gFrm     = new GammaForm();

            if (gFrm.ShowDialog() == DialogResult.OK)
            {
                Cursor = Cursors.WaitCursor;
                imageHandler.RestorePrevious();
                imageHandler.SetGamma(gFrm.RedComponent, gFrm.GreenComponent, gFrm.BlueComponent);
                Bitmap bmp = imageHandler.CurrentBitmap;
                histForm.AddRedHistogram(bmp);
                histForm.AddGreenHistogram(bmp);
                histForm.AddBlueHistogram(bmp);
                histForm.Show();
                Invalidate();
                Cursor = Cursors.Default;
            }
        }
示例#3
0
 private void menuItemGamma_Click(object sender, EventArgs e)
 {
     GammaForm gFrm = new GammaForm();
     gFrm.RedComponent = gFrm.GreenComponent = gFrm.BlueComponent = 0;
     if (gFrm.ShowDialog() == DialogResult.OK)
     {
         this.Cursor = Cursors.WaitCursor;
         imageHandler.RestorePrevious();
         imageHandler.SetGamma(gFrm.RedComponent, gFrm.GreenComponent, gFrm.BlueComponent);
         this.Invalidate();
         this.Cursor = Cursors.Default;
     }
 }