_numpysurfarray.py 文件源码

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

项目:Projects 作者: it2school 项目源码 文件源码
def array_blue(surface):
    """pygame.numpyarray.array_blue(Surface): return array

    copy pixel blue into a 2d array

    Copy the pixel blue values from a Surface into a 2D array. This will work
    for any type of Surface format.

    This function will temporarily lock the Surface as pixels are copied
    (see the Surface.lock - lock the Surface memory for pixel access
    method).
    """
    size = surface.get_size()
    array = numpy.empty(size, numpy.uint8)
    surface_to_array(array, surface, 'B')
    return array
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号