imagemagick Add Border

Adding a red 1 pixel border to an image

with -border option

convert image_file.jpg -bordercolor red -border 1 image_file_processed.jpg

with -frame option

convert image_file.jpg -mattecolor red -frame 1 image_file_processed.jpg

 

The color may be specified in many ways:

http://www.imagemagick.org/script/color.php

http://www.imagemagick.org/Usage/misc/#border

http://www.imagemagick.org/script/command-line-options.php?#frame