コード例 #1
0
 private void menuItemContrast_Click(object sender, EventArgs e)
 {
     ContrastForm cFrm = new ContrastForm();
     cFrm.ContrastValue = 0;
     if (cFrm.ShowDialog() == DialogResult.OK)
     {
         this.Cursor = Cursors.WaitCursor;
         imageHandler.RestorePrevious();
         imageHandler.SetContrast(cFrm.ContrastValue);
         this.Invalidate();
         this.Cursor = Cursors.Default;
     }
 }
コード例 #2
0
ファイル: ImageProcessing.cs プロジェクト: axl3697/Aether
        private void menuItemContrast_Click(object sender, EventArgs e)
        {
            ContrastForm cFrm = new ContrastForm();

            cFrm.ContrastValue = 0;
            if (cFrm.ShowDialog() == DialogResult.OK)
            {
                this.Cursor = Cursors.WaitCursor;
                imageHandler.RestorePrevious();
                imageHandler.SetContrast(cFrm.ContrastValue);
                this.Invalidate();
                this.Cursor = Cursors.Default;
            }
        }
コード例 #3
0
        private void menuItemContrast_Click(object sender, EventArgs e)
        {
            var histForm = new Histograms();
            var cFrm     = new ContrastForm();

            if (cFrm.ShowDialog() == DialogResult.OK)
            {
                Cursor = Cursors.WaitCursor;
                imageHandler.RestorePrevious();
                imageHandler.SetContrast(cFrm.ContrastValue);
                Bitmap bmp = imageHandler.CurrentBitmap;
                histForm.AddRedHistogram(bmp);
                histForm.AddGreenHistogram(bmp);
                histForm.AddBlueHistogram(bmp);
                histForm.Show();
                Invalidate();
                Cursor = Cursors.Default;
            }
        }