Turn image coordinates into cell coordinates.