Commit 58bf4a58 by BellCodeEditor

save project

parent 645ca768
Showing with 7 additions and 1 deletions
import wordcloud
from PIL import Image
import numpy
with open('py级.txt',encoding='utf-8') as f:
text=f.read()
w=wordcloud.WordCloud(background_color='white',font_path='simhei.ttf')
ing=Image.open('alice.png')
date=numpy.array(ing)
w=wordcloud.WordCloud(background_color='white',font_path='simhei.ttf',mask=date)
w.generate(text)
w.to_file('wordcloud.png')
......

77.6 KB | W: | H:

163 KB | W: | H:

wordcloud.png
wordcloud.png
wordcloud.png
wordcloud.png
  • 2-up
  • Swipe
  • Onion skin
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