CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
jackfrued

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: jackfrued/Python-100-Days
Path: blob/master/公开课/文档/第04次公开课-好玩的Python/code/example01.py
Views: 729
1
from PIL import Image, ImageFilter
2
3
4
chiling = Image.open('resources/chiling.jpg')
5
width, height = chiling.size
6
chiling.show()
7
chiling.transpose(Image.FLIP_LEFT_RIGHT).show()
8
chiling.filter(ImageFilter.GaussianBlur(4)).show()
9
chiling.filter(ImageFilter.EMBOSS).show()
10
chiling.thumbnail((width // 4, height // 4))
11
chiling.show()
12
13