Generate a background image of words in a given string using the wordcloud module.
Project description
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
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
Built Distribution
Close
Hashes for generate_background_image-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75216fe11ac972ea41853d83b7c3af5770f0e757fc927ae16173472876c7f886 |
|
MD5 | 3af6df3bbe5f9c730a6ba0e7c6a5c5c9 |
|
BLAKE2b-256 | e81721cf2ddab4b632a12efdf980166f039e399cc332afafee3d39d8399cf810 |
Close
Hashes for generate_background_image-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61d41d1abf6e5a2922213f6f8af387683ef5a38dc3bb913a2f229832d2c7ceee |
|
MD5 | db8af941cd9a08b42c8fc27b3a72aeed |
|
BLAKE2b-256 | 4f347a2489c55b79c14c3c74508ef9c106cb02bf94a97794acf5f7b5165d8c0b |