Hello,
user selects an image (using fileOpenDialog) then I need to run 3 algorithms sequentially (output of one algo becomes input of another) on this image. so, I'm using background worker for running these algorithms.
After each stage I want to see the result image. For this I created a ImageViewer class, which is just a simple form containing PictureBox control. This is what going on in
backgroundworker1_dowork()
{
Image img1 = runAlgo(img); //this statment is executing fine
ImageViewer imgviewer1 = new ImageViewer(img1);
imgviewer1.show();
}
now imgviewer1 is becoming unresponsive (in title its shown NOT RESPONDING) . And there is no image in it.
//ImageViewer constructor
ImageViewer(Image img)
{
this.pictureBox1.Image = img;
}