Some code for foveating images