用Python成像库绘制一条反锯齿线 [英] Drawing an anti-aliased line with thePython Imaging Library

查看:179
本文介绍了用Python成像库绘制一条反锯齿线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Python Imaging Library的ImageDraw.line()绘制一堆线条,但它们看起来很可怕,因为我找不到一种反锯齿的方法。我如何在PIL中防别线?如果PIL无法做到这一点,是否有另一个Python图像处理库,可以吗?

aggdraw 比PIL提供更好的绘图。


I'm drawing a bunch of lines with the Python Imaging Library's ImageDraw.line(), but they look horrid since I can't find a way to anti-alias them. How can I anti-alias lines in PIL? If PIL can't do it, is there another Python image manipulation library that can?

解决方案

aggdraw provides nicer drawing than PIL.

这篇关于用Python成像库绘制一条反锯齿线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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