A mistake was generating an image with the y axis inverted. Fixed.