Skip to content

arp242/border

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

border is a simple commandline tool to add a border around PNG images.

When posting screenshots it's often useful to add a little border around the edges so it's easier to see where the screenshot ends. This tool does exactly that.

Install with go get zgo.at/border, which will put the binary in ~/go/bin/border.

Use -border to control the border width (default: 2) and -color to control the colour (default: #999). The result is written to the original filename with the value of -write inserted before the extension default: _border). Use -write '' to overwrite the original.

Note: images are always saved as RGBA; you'll have to manually regenerate the palette if the input was indexed or greyscale.

Example:

example.png example_border.png


Alternatively, you can use ImageMagick:

$ convert -border 2x2 -bordercolor '#999999' example.png example_border.png

ImageMagick can actually do much more. I'm just the kind of guy who likes to write his own simple tools 😅

About

Simple commandline tool to add a border around PNG images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages