Create new, reusable function to normalize image coordinates
Various improvements and definition of maximum image size