示例#1
0
        private void gradToolStripMenuItem_Click(object sender, EventArgs e)
        {
            temp_image = new Bitmap(pictureBox1.Image);

            Filters filter = new GradFilter();

            backgroundWorker1.RunWorkerAsync(filter);
        }
示例#2
0
        private void gradToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GradFilter filter   = new GradFilter();
            Bitmap     newImage = filter.ProcessImage(image);

            if (backgroundWorker1.CancellationPending != true)
            {
                image = newImage;
            }
            pictureBox1.Image = image;
            pictureBox1.Refresh();
        }