Skip to main content

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")

mcu_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")

mcu_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

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)

Source distribution for generate-background-image 0.0.2
File Size Uploaded
generate_background_image-0.0.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for generate-background-image 0.0.2
File Interpreter ABI Platform
generate_background_image-0.0.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page