Skip to content

Files

110 lines (68 loc) · 1.44 KB

README.md

File metadata and controls

110 lines (68 loc) · 1.44 KB

imgmk

A simple CLI tool to make images with fonts and text.

Usage

There are a number of flags that you can use to make imgmk work for you the way you want it to. You can either pipe in text via a unix pipe or use the pipe flag.

Text Via Flag

./imgmk -text="This is a test"

That command above created this image:

Flagged Png

Text Via Pipe

cat flags.go | ./imgmk -size=7

That command above created this image:

Piped Png

Other Flags

You can specify other things via flags!

Path

You can specify the path to a ttf file. Right now it has to be a ttf file.

-path="/path/to/the/file.ttf"

Name

You can specify the output file name.

-name="out.png"

Text

As you saw above, you can specify the text.

-text="Test"

Size

You can also specify the font-size.

-size=16

Width

And the image width.

-width=640

Height

And the image height.

-height=480

DPI

And the DPI!

-dpi=300

Transparent

If you want the background to be transparent instead of white, pass the transparent flag.

-transparent

RGB

Specify the RGB color of the font(default black: 0,0,0)

-rgb=123,12,111

This image below was generated with the following:

./imgmk -transparent -width=200 -height=100

Transparent