//Filter private void gray_Click(object sender, EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.GrayScale(m_Bitmap)) { this.Invalidate(); } }
private void invert_Click(object sender, EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Invert(m_Bitmap)) { this.Invalidate(); } }
private void bright_Click(object sender, EventArgs e) { Parameter dlg = new Parameter(); dlg.nValue = 0; if (DialogResult.OK == dlg.ShowDialog()) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Brightness(m_Bitmap, dlg.nValue)) { this.Invalidate(); } } }
private void color_Click(object sender, EventArgs e) { RGB dlg = new RGB(); dlg.red = dlg.green = dlg.blue = 0; if (DialogResult.OK == dlg.ShowDialog()) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Color(m_Bitmap, dlg.red, dlg.green, dlg.blue)) { this.Invalidate(); } } }