具有宽轮廓的 Python 图像库椭圆

标签 python image python-imaging-library

使用 PIL 创建椭圆时,是否可以有更粗/更宽的轮廓?目前,我正在尝试执行 canvas.ellipse(box, outline=colour, fill=None),但希望能够为 outline 参数提供宽度.

最佳答案

您可以使用 aggdraw PIL 的 advanced-graphics 附加模块——有了它,绘制椭圆的方法和其他方法一样,需要一个 pen 对象,您可以用自己喜欢的宽度(以及颜色和不透明度)制作它).

关于具有宽轮廓的 Python 图像库椭圆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1517778/

相关文章:

python - 从Python的图片中获取所需的部分,然后找到该部分中的缺陷像素

python - numpy reshape 与负形状值混淆

python - 如何使用SQLAlchemy设置和获取关系记录?

python - 在 session 中保留 Django 用户

java - 使用 java.util.concurrent 模糊图像,但是,生成的图像完全是黑色的

Python PIL : image crop with black area if not enough photo region

python - Python 中的随机选择超出列表范围?

linux - 如何对子文件夹中的所有图像使用 ImageMagick 转换命令

php - 如何从服务器接收图像到应用程序

Python 图像 (PIL) 库无法根据 kwargs 正确调整大小