Generate background image
This repo is about how to Generate a background image of words in a given string using the wordcloud module. A generated background image can be used in Git repos, blogs, or articles.
Getting Started
Installation
pip3 install generate-background-image
Usage
- To generate image with black background.
from generate_background_image import generate_background_image
word_string = "Iron man,Thanos,Doctor Strange,Captain Marvel,Hulk,Vision,Thor,Groot,Rocket,Winter Soldier,Hela,Spiderman,Black Panther,Ultron,Wanda,Gamora,Star Lord,War Machine,Silver Quick,Mantis,Captain America,Loki,Antman,Black Widow,Hawkeye,Falcon,Drax,Shuri"
generate_background_image(words=word_string, out="output_image.png", layout_color="black")
- To generate image with white background.
from generate_background_image import generate_background_image
word_string = "Iron man,Thanos,Doctor Strange,Captain Marvel,Hulk,Vision,Thor,Groot,Rocket,Winter Soldier,Hela,Spiderman,Black Panther,Ultron,Wanda,Gamora,Star Lord,War Machine,Silver Quick,Mantis,Captain America,Loki,Antman,Black Widow,Hawkeye,Falcon,Drax,Shuri"
generate_background_image(words=word_string, out="output_image.png", layout_color="white")
Command line arguments
| tag (* = required) | variable | options | default value |
|---|---|---|---|
| -ws * | word_string | string of words separated by comma | REQUIRED |
| -o * | out | path to output image | "output_image.png" |
| -l | layout_color | choices=["black", "white"] | "black" |
| -W | width | width of image | 1200 |
| -H | height | height of image | 800 |
| -s | step_size | difference between freqencies of words | 50 |
| -b | bias | lowest initial frequency of a word | 10 |
LICENSE
This project is licensed under the terms of the MIT license.
Follow me
- Follow me on Linkedin: mohdsaqibhbi
- Subscribe my Youtube channel: StarrAI
Metadata
Release files for generate-background-image 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| generate_background_image-0.0.2.tar.gz | 3.3 kB | Without provenance | Details for generate_background_image-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| generate_background_image-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for generate_background_image-0.0.2-py3-none-any.whl |
Total release size: 7.4 kB
Release files / generate_background_image-0.0.2.tar.gz
| Download URL | generate_background_image-0.0.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75216fe11ac972ea41853d83b7c3af5770f0e757fc927ae16173472876c7f886
|
|
BLAKE2b-256 checksum How to use checksums |
e81721cf2ddab4b632a12efdf980166f039e399cc332afafee3d39d8399cf810
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.24.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.49.0 importlib-metadata/4.11.2 keyring/21.4.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.7.4
|
Release files / generate_background_image-0.0.2-py3-none-any.whl
| Download URL | generate_background_image-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61d41d1abf6e5a2922213f6f8af387683ef5a38dc3bb913a2f229832d2c7ceee
|
|
BLAKE2b-256 checksum How to use checksums |
4f347a2489c55b79c14c3c74508ef9c106cb02bf94a97794acf5f7b5165d8c0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.24.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.49.0 importlib-metadata/4.11.2 keyring/21.4.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.7.4
|
Security for generate-background-image 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.