private void loadImage_Click(object sender, EventArgs e) { //initialize the controller ImageController imageController = new ImageController(files, bitmap, filters); //call the open file method from the controller originalBitmap = imageController.openOriginalFile(); //set the original bitma into a resized version of the selected file, so it fits on the preview originalBitmap = imageController.CopyToSquareCanvas(originalBitmap, ImagePreview.Width); //send the bitmap into the preview ImagePreview.Image = originalBitmap; //enable the save button and list saveImage.Enabled = true; EdgeDetectionList.Enabled = true; // set the list index back to 0 when you load a new image EdgeDetectionList.SelectedIndex = 0; }