Minimal utility for generating images with textual caption
Project description
Minimal utility for generating images with textual caption
Usage
Download an image
curl https://ichef.bbci.co.uk/news/1024/branded_news/46C9/production/_118512181_zhurong-china-mars-lander.jpg -o ./image.jpg
Download a font
curl https://fonts.google.com/download?family=Roboto -o ./roboto.zip ; unzip ./roboto.zip -d ./Roboto
Provide a caption and Generate the image:
font_path = './Roboto/Roboto-Regular.ttf' image_path = './image.jpg' im = generate_captioned('China lands rover on Mars'.upper(), image_path=image_path, size=(1080, 1350), font_path=font_path, filter_color=(0, 0, 0, 40)) im.show() im.convert('RGB').save('drawn_image.jpg')
Results will look like:
Installation
pip install pynter
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pynter-0.1.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
pynter-0.1.0-py3-none-any.whl
(4.6 kB
view hashes)