Affine.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:nimo 作者: wolfram2012 项目源码 文件源码
def AffineNonUniformScale(sx,sy,new_size,filter=BILINEAR):
    '''
    Create a scale transform with different values for the x and y directions.

    @param sx: scale in the x direction.
    @param sy: scale in the y direction.
    @param new_size: new size for the image.
    @param filter: PIL filter to use.
    '''
    matrix = array([[sx,0,0],[0,sy,0],[0,0,1]],'d')

    return AffineTransform(matrix,new_size,filter)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号