/capybara

An convenient tool for adding borders, watermarks to images, with possible future additions such as format conversion, image compression, and more.

Primary LanguageGoMIT LicenseMIT

Capybara

capybara

Go Report Card codecov Repo Size

A convenient tool for adding borders, watermarks to images, with possible future additions such as format conversion, image compression, and more.

Node: The project is in its early development stage, so parameters and commands may be subject to change.

Usage

build binary from source

$ git clone https://github.com/sincerefly/capybara
$ cd capybara
$ go build

Quick Start

add border with default parameters

$ capybara style simple

using 'simple' style, with 100 border size, process 'input' folder images, save to 'output' folder

$ capybara style simple -w 100 -i input -o output

border color

# with html color names, case-insensitive
$ capybara style simple --color AliceBlue

# with hex
$ capybara style simple --color "#228B22"

# with rgb
$ capybara style simple --color "rgb(238, 130, 238)"

# with rgba
$ capybara style simple --color "rgba(238, 130, 238, 255)"

Style Example

$ capybara style simple
$ capybara style text_bottom
$ capybara style melon
style: simple style: text_bottom style: melon
$ capybara style pineapple
$ capybara style durian
style: pineapple

Help

Different styles support different parameters. Please refer to the documentation for details

You can use subcommand --help to view the default parameters.

$ ./capybara style text_bottom --help
Style: Footer text, with photo exif

Usage:
  style style text_bottom [flags]

Flags:
  -c, --color string           specify border color (default "white")
      --container-height int   bottom text container height (default 300)
  -h, --help                   help for text_bottom
  -i, --input string           specify input folder (default "input")
  -o, --output string          specify output folder (default "output")
  -w, --width int              specify border width (default 100)
      --without-subtitle       without subtitle

Global Flags:
      --debug            enables detailed logging for debugging.
      --no-parallelism   disables parallel processing, without goroutine.