Commit 93199cea by BellCodeEditor

save project

parent f21ea1ae
Showing with 13 additions and 4 deletions
import wordcloud import wordcloud
wordcloud.wordCloud(background_color="black",font_path="SimHef.ttf") from PIL import Image
w.generate("考试") import numpy
w.to_fill('wordcloud.png') with open('python二级考试大纲.txt',encoding="utf-8") as f:
\ No newline at end of file text=f.read()
img=Image.open('duck.png')
date=numpy.array(img)
imgcolor=wordcloud.ImageColorGenerator(date)
wordcloud.wordCloud(background_color="black",font_path="SimHef.ttf",mask=date)
w.generate(text)
w.to_fill('wordcloud.png')
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