标签:raw import mamicode point start lib imp plt position
原文链接: https://github.com/ssloy/tinyrenderer/wiki/Lesson-0-getting-started
import matplotlib.pyplot as plt
from PIL import Image
def draw_point(image, position=(0,0), color=(255,255,255)):
image.putpixel(position, color)
return image
image = Image.new("RGB",(100, 100),(0,0,0))
draw_point(image, (52,41), (255,0,0))
plt.imshow(image)
标签:raw import mamicode point start lib imp plt position
原文地址:https://www.cnblogs.com/grass-and-moon/p/13184244.html