Move the logic to the `load_image()` in the main window
Move the logic to the
load_image()in the main window