Page 1 of 1

Insert Image inside box i created.

Posted: 2011-01-12T10:49:00-07:00
by aLabelMaker
Here is the box that I created.
convert -density 72 -size 576x252 xc:white -stroke black -linewidth 1 -fill white -draw "rectangle 3,3 573,249" -draw "line 193,249 193,3" -draw "line 383,249 383,3" cv05.png

I am looking to insert an image in the middle box and have not found the right command for placing the image I need.
Any resources and answers are greatly appreciated.
Thanks!

Re: Insert Image inside box i created.

Posted: 2011-01-12T11:15:34-07:00
by fmw42
If you have drawn your boxes correctly centered, and the image you want to put in the middle is no bigger than the box, you can do simply,

convert cv05.png yourinsertimage.png -gravity center -compose over -composite resultimage.png

if you need to move it slightly, you can add -geometry +X+Y to shift it X or Y amount of pixels from the center

convert cv05.png yourinsertimage.png -gravity center -geometry +X+Y -compose over -composite resultimage.png

see http://www.imagemagick.org/Usage/layers/ and http://www.imagemagick.org/Usage/layers/#convert