private void brightnessToolStripMenuItem_Click(object sender, EventArgs e) { try { argForm dlg = new argForm(); dlg.nValue = 0; if (System.Windows.Forms.DialogResult.OK == dlg.ShowDialog()) { Bitmap m_Bitmap = (Bitmap)InputImage.Image; undo_picture = m_Bitmap; Bitmap mm_bit = (Bitmap)m_Bitmap.Clone(); if (BitmapTransform.Brightness(mm_bit, (sbyte)dlg.nValue)) { this.InputImage.Invalidate(); } InputImage.Image = (Bitmap)mm_bit; InputImage.Invalidate(); } } catch { } }
private void restoreImageToolStripMenuItem_Click(object sender, EventArgs e) { try { InputImage.Image = (System.Drawing.Image)undo_picture.Clone(); InputImage.Invalidate(); } catch { } }
private void sharpenImageToolStripMenuItem_Click(object sender, EventArgs e) { try { Bitmap m_Bitmap = (Bitmap)InputImage.Image; undo_picture = m_Bitmap; Bitmap mm_bit = (Bitmap)m_Bitmap.Clone(); if (BitmapTransform.Sharpen(mm_bit, 11)) { this.InputImage.Invalidate(); } InputImage.Image = (Bitmap)mm_bit; InputImage.Invalidate(); } catch (Exception e12) { System.Windows.Forms.MessageBox.Show(e12.Message); } }