Calculates the image ratio (X to Y).

        :param Image image: This is your engine's ``Image`` object. For
            PIL it's PIL.Image.
        :rtype: float
        :returns: The X to Y ratio of your image's dimensions.

def get_image_ratio(self, image):
        """
        Calculates the image ratio (X to Y).

        :param Image image: This is your engine's ``Image`` object. For
            PIL it's PIL.Image.
        :rtype: float
        :returns: The X to Y ratio of your image's dimensions.
        """
        x, y = self.get_image_size(image)
        return float(x) / y