Goal: to add border of selected width.
Relevant reading:
- ImageMagick docs, Adding/Removing Image Edges, https://www.imagemagick.org/Usage/crop/#border
To add a border use bordercolor and border
commands:
magick <input-file> -bordercolor <color> ^
-border <x width x y width><output-file>
If vertical and horizontal borders are to be of the same width you may
use shorthand -border <width>.
example
magick input\input.png -bordercolor #000000 -border 4 output\output.png
explanation
-
-bordercolor #000000sets border color to black; -
-border 4is a shorthand form of-border 4x4.
result