コード例 #1
0
 private void btnGray_Click(object sender, EventArgs e)
 {
     if (OriginalForm != null)
     {
         Bitmap copy = new Bitmap(PicOriginal);
         Processing.ConvertToGray(copy);
         PicResult = copy;
         if (ResultForm == null || ResultForm.Visible == false)
         {
             ResultForm = new ResultForm();
             ResultForm.Show();
         }
         else
         {
             OriginalForm.ReloadImage();
         }
     }
 }
コード例 #2
0
        private void btnOpen_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Filter = "Image File (*.bmp, *.jpg)|*.bmp; *.jpg";
            if (DialogResult.OK == openFile.ShowDialog())
            {
                PicOriginal = new Bitmap(openFile.FileName);
                if (OriginalForm == null || OriginalForm.Visible == false)
                {
                    OriginalForm = new OriginalForm();
                    OriginalForm.Show();
                }
                else
                {
                    OriginalForm.ReloadImage();
                }
            }
        }