这与更大的曼德尔虫有关,但这是其中的主要部分。
如果我这样做:
import numpy as np
from PIL import Image
l = np.zeros((100, 100, 3), dtype=np.uint8)
l[0,0,:] = 1
img = Image.fromarray(l, "RGB")
img.save("ex.png")
我明白了:
这显然不是我对图像执行的操作。如果你看左上角,它会显示一堆绿色、蓝色和红色等像素,而我希望它会产生 1 个像素(左上角)白色/灰色。
怎么了?