checking for image dimensions