コード例 #1
0
 private void btnHistogram_Click(object sender, EventArgs e)
 {
     if (OriginalForm != null)
     {
         if (PicResult != null)
         {
             Bitmap copy = new Bitmap(PicResult);
             if (!Processing.isGrayScale(copy))
             {
                 Processing.ConvertToGray(copy);
                 PicResult = copy;
                 ResultForm.ReloadImage();
             }
             HistogramInfos = Processing.CreateHistogramInfo(copy);
             if (HistogramForm == null || HistogramForm.Visible == false)
             {
                 HistogramForm = new HistogramForm();
                 HistogramForm.Show();
             }
             else
             {
                 HistogramForm.ReloadHistogram();
             }
         }
     }
 }
コード例 #2
0
 private void btnVerMirroring_Click(object sender, EventArgs e)
 {
     if (OriginalForm != null)
     {
         Bitmap copy = new Bitmap(PicOriginal);
         Processing.VerticallMirroring(copy);
         PicResult = copy;
         if (ResultForm == null || ResultForm.Visible == false)
         {
             ResultForm = new ResultForm();
             ResultForm.Show();
         }
         else
         {
             ResultForm.ReloadImage();
         }
     }
 }
コード例 #3
0
 private void btnQuantize_Click(object sender, EventArgs e)
 {
     if (OriginalForm != null)
     {
         Bitmap copy = new Bitmap(PicOriginal);
         Processing.Quantize(copy, (int)this.numberQuantize.Value);
         PicResult = copy;
         if (ResultForm == null || ResultForm.Visible == false)
         {
             ResultForm = new ResultForm();
             ResultForm.Show();
         }
         else
         {
             ResultForm.ReloadImage();
         }
     }
 }