Ejemplo n.º 1
0
        private int GetIntInput()
        {
            Parameter dlg = new Parameter();

            dlg.nValue = 0;
            int retVal = 0;

            if (DialogResult.OK == dlg.ShowDialog())
            {
                retVal = dlg.nValue;
                this.Invalidate();
            }
            return(retVal);
        }
Ejemplo n.º 2
0
        private void OnEdgeKirsh(object sender, System.EventArgs e)
        {
            Parameter dlg = new Parameter();

            dlg.nValue = 0;

            if (DialogResult.OK == dlg.ShowDialog())
            {
                m_Undo = (Bitmap)m_Bitmap.Clone();
                if (BitmapFilter.EdgeDetectConvolution(m_Bitmap, BitmapFilter.EDGE_DETECT_KIRSH, (byte)dlg.nValue))
                {
                    this.Invalidate();
                }
            }
        }
Ejemplo n.º 3
0
        private void Filter_Contrast(object sender, System.EventArgs e)
        {
            Parameter dlg = new Parameter();

            dlg.nValue = 0;

            if (DialogResult.OK == dlg.ShowDialog())
            {
                m_Undo = (Bitmap)m_Bitmap.Clone();
                if (BitmapFilter.Contrast(m_Bitmap, (sbyte)dlg.nValue))
                {
                    this.Invalidate();
                }
            }
        }
Ejemplo n.º 4
0
        private void EdgeEnhance_Click(object sender, System.EventArgs e)
        {
            Parameter dlg = new Parameter();

            dlg.nValue = 0;

            if (DialogResult.OK == dlg.ShowDialog())
            {
                m_Undo = (Bitmap)m_Bitmap.Clone();
                if (BitmapFilter.EdgeEnhance(m_Bitmap, (byte)dlg.nValue))
                {
                    this.Invalidate();
                }
            }
        }
        private void contrastToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                Parameter dlg = new Parameter();
                dlg.nValue = 0;

                if (DialogResult.OK == dlg.ShowDialog())
                {
                    Bitmap m_Bitmap = (Bitmap)pic_box.Image;
                    undo_picture = m_Bitmap;
                    Bitmap mm_bit = (Bitmap)m_Bitmap.Clone();
                    if (BitmapFilter.Contrast(mm_bit, (sbyte)dlg.nValue))
                        this.Invalidate();

                    pic_box.Image = (Bitmap)mm_bit;
                    pic_box.Invalidate();
                }
            }
            catch
            {

            }
        }