Commit 8cc2046c by BellCodeEditor

save project

parent a8392f66
Showing with 19 additions and 12 deletions
P.png

259 KB

a.png

19 KB

from PIL import Image
import numpy as np
img=Image.open("./a.png")
print(img)
value=np.array(img)
print(value)
\ No newline at end of file
File added
""" import wordcloud
请使用turtle模块画出五角星 from PIL import Image
""" import numpy
import turtle #import jieba
open=turtle.pen() #backgroud_color="white"
For i in range(5) img=Image.open("./P.png")
pen.forward(200) data=numpy.array(img)
pen.right(144) img_colors=wordcloud.ImageColorGenerator(data)
pen.hideturtle() w=wordcloud.WordCloud(background_color="red",font_path='a.ttf',mask=data,min_font_size=20,max_font_size=50)
pen.done() w.generate("你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好")
w.to_file("./a.png")
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment