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, pixel
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.0.3.tar.gz
(2.8 kB
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.0.3-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file text2png-0.0.3.tar.gz.
File metadata
- Download URL: text2png-0.0.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9d596c5e6a24da5a71310fca9bffd2414aa4a197b0f0a4d9b86c82fd769992b
|
|
| MD5 |
ef595e5ceddd6e6aebb04f3b9f82d496
|
|
| BLAKE2b-256 |
fa9f6c68bc1e230f7cd2e4cc2c54fccc40f76868d7b7acdc5646fe6f00eb3c32
|
File details
Details for the file text2png-0.0.3-py3-none-any.whl.
File metadata
- Download URL: text2png-0.0.3-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33f3d92d6825db31288398e68f29c3a98290de6b4d292fab37fdecf7446e2545
|
|
| MD5 |
fa69e3340df879e2fc057c5697a7c574
|
|
| BLAKE2b-256 |
017be7d6aeed9da0accd9ab224416ec47c706da23a0f06dfb3e329a9ec3d9a27
|