当前位置: 首页>>代码示例>>Python>>正文


Python Image.BILINEAR属性代码示例

本文整理汇总了Python中Image.BILINEAR属性的典型用法代码示例。如果您正苦于以下问题:Python Image.BILINEAR属性的具体用法?Python Image.BILINEAR怎么用?Python Image.BILINEAR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在Image的用法示例。


在下文中一共展示了Image.BILINEAR属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import Image [as 别名]
# 或者: from Image import BILINEAR [as 别名]
def __init__(self, size, interpolation=Image.BILINEAR):
        self.size = size
        self.interpolation = interpolation 
开发者ID:Kashu7100,项目名称:Qualia2.0,代码行数:5,代码来源:transforms.py

示例2: deform

# 需要导入模块: import Image [as 别名]
# 或者: from Image import BILINEAR [as 别名]
def deform(image, deformer, resample=Image.BILINEAR):
    "Deform image using the given deformer"
    return image.transform(
        image.size, Image.MESH, deformer.getmesh(image), resample
        )

##
# Equalize the image histogram.  This function applies a non-linear
# mapping to the input image, in order to create a uniform
# distribution of grayscale values in the output image.
#
# @param image The image to equalize.
# @param mask An optional mask.  If given, only the pixels selected by
#     the mask are included in the analysis.
# @return An image. 
开发者ID:awslabs,项目名称:mxnet-lambda,代码行数:17,代码来源:ImageOps.py

示例3: _img_rotate

# 需要导入模块: import Image [as 别名]
# 或者: from Image import BILINEAR [as 别名]
def _img_rotate(self, im, target, degree, bgcolor = '#ffffff', destformat = None):
        """
        Rotate image. The ``degree`` argument is measured clock-wise.
        """
        #rotated = im.convert('RGBA').rotate(angle=360-degree)
        alpha = Image.new('RGBA', im.size, bgcolor)
        alpha.paste(im)
        rotated = alpha.rotate(angle=360-degree, resample=Image.BILINEAR)
        
        bg = Image.new('RGBA', im.size, bgcolor)
        result = Image.composite(rotated, bg, rotated)
        self._saveimage(result, target, destformat if destformat else im.format) 
开发者ID:guohongze,项目名称:adminset,代码行数:14,代码来源:base.py

示例4: __init__

# 需要导入模块: import Image [as 别名]
# 或者: from Image import BILINEAR [as 别名]
def __init__(self, size, mode=Image.BILINEAR):
        self.size = pair(size)
        self.mode = mode 
开发者ID:oreilly-japan,项目名称:deep-learning-from-scratch-3,代码行数:5,代码来源:transforms.py


注:本文中的Image.BILINEAR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。