Skip to content

add-badge 0.9.4

Install from the command line:
Learn more about npm packages
$ npm install @sourcetoad/add-badge@0.9.4
Install via package.json:
"@sourcetoad/add-badge": "0.9.4"

About this version

Add Badge

Node commands to add an overlay badge, inset to the non-transparent area.

Installation

Using npm:

npm install --save-dev @sourcetoad/add-badge

Using yarn:

yarn add --dev @sourcetoad/add-badge

Usage

Add a badge to a single image:

npx add-badge <input-image> <output-image> <badge-text> [options]

Add a badge to multiple images, modifying them in-place:

npx add-badges <input-glob> <badge-text> [options]

See fast-glob for glob details.

Options

See samples for some previews.

Option Description Default
--font-file Text font file Roboto Black (Bundled)
--font-size Text size (pt, scaled for images not 192px) 28
--text-color Text color (transparent for transparent) #666666
--background-color Badge background color #ffffff
--gravity Badge gravity (northwest, north, northeast, southwest, south, southeast) southeast
--shadow-color Badge shadow color rgba(0,0,0,0.6)
--dry-run/-d Does not perform actions

Details


Assets

  • add-badge-0.9.4.tgz

Download activity

  • Total downloads 3
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all