pimage.py 文件源码

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

项目:pyprocessing 作者: esperanc 项目源码 文件源码
def mask(self,image):
        """Uses the image passed as parameter as alpha mask."""
        if npy:
            aux1 = numpy.bitwise_and(self.pixels,0xffffff)
            aux2 = numpy.bitwise_and(image.pixels,0xff000000)
            self.pixels = numpy.bitwise_or(aux1,aux2)
            return
        for i in range(self.width):
            for j in range(self.height):
                n = self.get(i,j)
                m = image.get(i,j)
                new = ((m & 0xff000000) << 24) | (n & 0xffffff)
                self.set(i,j,new)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号