word_rand_img

module
v0.0.0-...-b95eb0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2021 License: MIT

README

Word Rand Img

This generate a random image from the entered words.

Http

Endpoint

Endpoint to generate image.

https://wordimg-otho5yxlgq-an.a.run.app

Query

The size of the image is fixed at 512 * 512.

  • text text to write to image
  • size font size
  • color text color

CLI

Install
go get github.com/komem3/word_rand_img/cmd/wordimg
Usage
Help
$ wordimg -h
Usage:
  wordimg [OPTIONS]

Application Options:
  -m, --message=   Message to write to image. required.
  -i, --imagePath= Path of the image to write. Default is 'unix_time.png
  -f, --font=      Path to font file. Only support ttf.
      --size=      Font size.
  -w, --width=     Width of the generated image. (default: 512)
  -h, --height=    Height of the generated image. (default: 512)
  -c, --color=     Text color. Format is 'R:G:B'. Example: 255:255:0(yellow)

Help Options:
  -h, --help       Show this help message
Simple case
$ wordimg -m "Hello World"
wrote: 1612796180.png
Specify font
$ wordimg -m "こんにちは世界" -f ./SawarabiGothic-Regular.ttf
wrote: 1612796255.png

License

MIT

Author

komem3

Directories

Path Synopsis
cmd
Package wordimg implements generator to create an image from text.
Package wordimg implements generator to create an image from text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL