Moved check of image dimension from command line input to the code