ImageMagick borders and shadows

I borrowed this simple ImageMagick hack to make images have a small border and drop shadow.

Original:

convert foo.jpg -resize 200 -bordercolor white -border 1 -bordercolor black -border 1 -background black bar.jpg
convert foo.jpg -resize 200 -bordercolor white -border 1 -bordercolor black -border 1 \
-background black \( +clone -shadow 80x1+1+1 \) +swap -background white -flatten bar.jpg

The drop shadow example needs a white background to look decent.



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.119.142.210
To prevent spam please submit by clicking the kitten: