我在Windows机器上使用PIL 1.1.7和Python 2.7。由于PIL编译了,所以我在开发服务器上使用以下代码:draw.text((0, 0), 'Текст на русском', 24, encoding="utf-8")
draw.text((0, 0), 'Текст на русском', font
我正在尝试运行一些示例程序,但我一直收到以下错误消息:
ImportError:没有名为ImageFont的模块
fromrepetitions = [5, 5, 5]) # unit cell repetitions in each direction
我试过通过pip安装ImageFont、PIL
是否有任何Python选项可用于用文本覆盖图像?我试过使用PIL/Pillow,但是输出确实是粒状的和手工的。这是我的代码:from PIL import ImageFontdraw = ImageDraw.Draw(img)
font = ImageFont.truetype("Comic Sans MS