使用python中的2D列表水平翻转图像

时间:2014-11-10 22:26:04

标签: python image nested-loops nested-lists

def flip_horiz(pixels):

    height = len(pixels)
    width = len(pixels[0])
    image = create_blank_image(height,width)

    for r in range(height):
        for c in range(width):

            image[r][c] = pixels[r][((width-1)-c)]

    return image

我收到一个错误,它是NONE TYPE

0 个答案:

没有答案