Easiest way to create text thumbnail.
Project description
Text to Image (Text to PNG)
Easiest way to create text thumbnail.
Hierarchy
text2png
'---- TextToPng()
'---- create()
Example
python
from text2png import *
t2p = TextToPng(
# absolute path to font file
font_file="C:\\Windows\\Fonts\\msgothic.ttc",
# font size, integer
font_size=64,
# background color, RGB value
background_color=(0, 0, 0),
# text color, RGB value
text_color=(255, 255, 255),
# png file save directory
save_dir="C:\\Temp"
)
print(
t2p.create(
# what text
text="HELLO",
# text padding, in pixels
padding=15,
# file name
filename="hello.png"
)
)
# C:\\Temp\\hello.png
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
text2png-0.3.0.tar.gz
(13.9 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
text2png-0.3.0-py3-none-any.whl
(14.0 MB
view details)
File details
Details for the file text2png-0.3.0.tar.gz.
File metadata
- Download URL: text2png-0.3.0.tar.gz
- Upload date:
- Size: 13.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.25.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b18f51de924b454d475b65d5be8c0facee19d5f0ee1dfcdcd62ced585ad9357d
|
|
| MD5 |
cdfcef61b34f2bb65e292a881bdc63cf
|
|
| BLAKE2b-256 |
fba99c7979c79e60ea57e12fdc8fddeae608b4369a6947074961b464f3526f03
|
File details
Details for the file text2png-0.3.0-py3-none-any.whl.
File metadata
- Download URL: text2png-0.3.0-py3-none-any.whl
- Upload date:
- Size: 14.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.25.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6021f9487d948317f099a1a4abcedbbed0a8b85eb4264b7195a7a813fc424445
|
|
| MD5 |
c5abca7e7bbade71f72d7e9dc78eb7d1
|
|
| BLAKE2b-256 |
a85eff454a4797dbcd02fc9efee25b65e259cf91cacfa5c437d14a30645a2127
|