當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。