本文实例为大家分享了python生成圆形图片的具体代码,供大家参考,具体内容如下 # -*- coding: utf-8 -*- """ __author__= 'Du' __creation_time__= '2018/1/5 9:08' """ import os, math from PIL import Image def circle(): ima = Image.open("ball1.jpg").convert("RGBA") # ima = ima.resize((600, 600), Image.ANTIALIAS) size = ima.size print(