REF: simplified code and removed unnecessary code.
ENH: Added display of the image dimensions to the UI.