我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用PIL.Image.MESH。
def deform(image, deformer, resample=Image.BILINEAR): """ Deform the image. :param image: The image to deform. :param deformer: A deformer object. Any object that implements a **getmesh** method can be used. :param resample: What resampling filter to use. :return: An image. """ return image.transform( image.size, Image.MESH, deformer.getmesh(image), resample )
def deform(image, deformer, resample=Image.BILINEAR): """ Deform the image. :param image: The image to deform. :param deformer: A deformer object. Any object that implements a **getmesh** method can be used. :param resample: An optional resampling filter. Same values possible as in the PIL.Image.transform function. :return: An image. """ return image.transform( image.size, Image.MESH, deformer.getmesh(image), resample )