add border on top of image without resizing with imagemagick -


here 100x67px image of turtle:

yertle

if add border image so:

convert turtle.png -border 50x50 turtle-border.png 

imagemagick adds border around original image, increasing dimensions 200x167px.

yertle border

how paint border on top of turtle image without resizing dimeions? yes, know turtle's head , feet no longer visible.

to create border that's "eating" image, use -shave reduce image, -extent original size.

convert turtle.png -background gray75 \         -shave 10x10 \         -extent 100x67-10-10 \         turtle-border2.png 

shave & extent

previous answer

use -draw operation place rectangle on image.

convert turtle.png -fill gray75 \         -draw 'rectangle 0 0 100 33' \         turtle-border.png 

add border on top of image without resizing imagemagick


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -