Skip to main content

Easiest way to create text thumbnail.

Project description

Text to Image (Text to PNG)

version license pyversions
donate powered made

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text2png-0.0.3-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

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

Hashes for text2png-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f9d596c5e6a24da5a71310fca9bffd2414aa4a197b0f0a4d9b86c82fd769992b
MD5 ef595e5ceddd6e6aebb04f3b9f82d496
BLAKE2b-256 fa9f6c68bc1e230f7cd2e4cc2c54fccc40f76868d7b7acdc5646fe6f00eb3c32

See more details on using hashes here.

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

Hashes for text2png-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 33f3d92d6825db31288398e68f29c3a98290de6b4d292fab37fdecf7446e2545
MD5 fa69e3340df879e2fc057c5697a7c574
BLAKE2b-256 017be7d6aeed9da0accd9ab224416ec47c706da23a0f06dfb3e329a9ec3d9a27

See more details on using hashes here.

Supported by

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