is it possible to combine -draw and -border?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
silversonicaxel
Posts: 10
Joined: 2013-12-19T07:00:20-07:00
Authentication code: 6789

is it possible to combine -draw and -border?

Post by silversonicaxel »

Hi guys,
I put an image over another, using the draw command, I would like to know if it may be possible to apply to this image one border with the classical bordercolor and border command

this is my example code

Code: Select all

convert -size 600x357 xc:none -draw "image Over 0,0 0,0 'background01.jpg'" -draw "image Over 25,190 0,0 'aktiviteiten01.jpg'" -draw "image Over 200,190 0,0 'cultuur13.jpg'" -draw "image Over 380,190 0,0 'natuur01.jpg'" -draw "image Over 0,0 0,0 'frame.png'" -extent 600x357 -append +repage 638044758.30105944.jpg
and guess I should put a white border on the image natuur01.jpg

how could i do?


thanks in advance
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: is it possible to combine -draw and -border?

Post by fmw42 »

If I understand your request, just add

-bordercolor xxx -border yyy

right before the output


If you want to put a border around one of the input image, then you need to add that right after the input image. You may want to use parenthesis processing to keep the processing on each image separate.

see
http://www.imagemagick.org/Usage/basics/#parenthesis

If this is not what you want, please clarify further and provide your IM version and platform.

You may also want to use -compose ... -composite or -flatten, to combine your images. That is an easier way than using -draw. See
http://www.imagemagick.org/Usage/layers/#convert
http://www.imagemagick.org/Usage/layers/#flatten
http://www.imagemagick.org/Usage/layers/#layers
Post Reply