占位符是一个简单的小python模块,它基于martin marcher的工作创建(drumroll..)占位符图像。
python-placeholder的Python项目详细描述
用于创建占位符图像的简单模块
安装方式
$ pip install python-placeholder
示例:
fromplaceholderimportPlaceHolderImageimg=PlaceHolderImage(width=300,height=200,path='placeholder.png')img.save_image()
已知错误:
- 如果不提供字体到占位符图像的绝对路径,则使用的默认字体将非常小。
- 如果您得到的是类似于未安装imagingft c模块的内容,请查看这里https://stackoverflow.com/questions/4011705/python-the-imagingft-c-module-is-not-installed