Skip to main content

A package which can convert text to image.

Project description

Texttoimage

Texttoimage is a Python library for converting text to a transparent image.

Installation

Use the package manager pip to install texttoimage.

pip install texttoimage

Usage

import texttoimage

texttoimage.convert('Hello World') # generate an image named "helloworld.png"

# if you want to create a multiple line text image you can use `\n` in your text
text = 'Hello World\n This is a multiple line text'
# It'll generate an image which the font size is 48 and color is red.
texttoimage.convert(text, image_file='test.png', font_size=100, color='red')

Examples

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

texttoimage-Jeffrey-Hu-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

texttoimage_Jeffrey_Hu-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file texttoimage-Jeffrey-Hu-0.0.1.tar.gz.

File metadata

  • Download URL: texttoimage-Jeffrey-Hu-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for texttoimage-Jeffrey-Hu-0.0.1.tar.gz
Algorithm Hash digest
SHA256 938826c0d39ddc0e57f527ddea5c3d8504b55f616cb48b8800a9e4e202d8dc4f
MD5 7cdf6cda389406e93d7f7d9bf557832c
BLAKE2b-256 22bf6f23f7a7d063c8812d9b3be5cb166f1023dfc76c5ecb904fea668616e265

See more details on using hashes here.

File details

Details for the file texttoimage_Jeffrey_Hu-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: texttoimage_Jeffrey_Hu-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for texttoimage_Jeffrey_Hu-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb1e69f1c5a6d6c5ce49b1ae410925651fa0df1d958b0c58391ff3891e9336e4
MD5 fceba1645d67317e33eb8bfb78bb2c13
BLAKE2b-256 62b1c32b4be645db92a1a5a23409dd1397b209393fd9c60bcb34521dfbfb094e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page