How to generate image with a string?
python at mrabarnett.plus.com
Thu Dec 20 13:20:32 EST 2018
On 2018-12-20 16:37, sntshkmr60 at gmail.com wrote:
> More or less I'm trying to replicate placeholder.com in Python. I'll be using Django in the backend. Given all the parameters, I'm not sure how will I be generating the images.
> * I will be passing width and height of the image and maybe the text and background color.
> * I also want to center the text vertically and horizontally.
> * The text size will be increased proportionally to the image being generated.
> Can someone enlighten my path? What libraries can be capable of doing this?
Have a look at the Pillow module. It's available from PyPI:
More information about the Python-list