具有宽轮廓的Python图像库椭圆 [英] Python Image Library ellipse with wide outline

查看:127
本文介绍了具有宽轮廓的Python图像库椭圆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When creating an ellipse with PIL, is it possible to have a thicker/wider outline? Currently, I'm trying to do canvas.ellipse(box, outline=colour, fill=None), but would like to be able to give the outline parameter a width.

推荐答案

你可以使用 aggdraw 高级图形附加模块到PIL - 用它来绘制椭圆的方法,就像其他人一样,需要一个对象,您可以使用自己喜欢的宽度(以及颜色和不透明度)来制作。

You could use the aggdraw advanced-graphics add-on module to PIL -- with it, the method to draw an ellipse, like others, takes a pen object which you can make with your favorite width (as well as color and opacity).

这篇关于具有宽轮廓的Python图像库椭圆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆