Adding border to images.

A very simple script to add border to images :

for i in *.jpg; do montage -geometry 720×576 -background black -quality 100 $i conv-$i; done

This is one line that you can run the directory containing all your images and all the files with extension of \”jpg\” will be assumed to be images and the command run on them to add the border. The border is black in color and quality of the border is 100%.

The magic used here is montage command that is available in package : ImageMagick

If you do not have this package installed and use yum package manager then just run the command:

yum install ImageMagick

There are quite a lot of other options available with montage command that you can see in the man page or with –help

Example:
Original Image:

\"My,

Image with Border:

\"My,
[ad#ad-1]

About Amit Agarwal

1 Comment on “Adding border to images.”

1 Trackback on “Adding border to images.”