Check that sphere coordinates do not extend past the image dimensions.
Check that sphere coordinates do not extend past the image dimensions.