Hi guys and gals,
When i add borders to images, it places the border on the outside of the image thus increasing the images dimensions.
How can i add a border to the inside of the image, so that the image retains its previous dimensions but has a border overlayed around the edges of the image?
Cheers
How to borders on the inside ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to borders on the inside ?
Please always provide your Imageamgick version and platform when asking questions, since syntax may differ. Also provide your command line if possible.
The the way to do what you want is to shave off the amount of pixels that you want to add as a border. So if you only want one pixel border, then
For new users, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
The the way to do what you want is to shave off the amount of pixels that you want to add as a border. So if you only want one pixel border, then
Code: Select all
convert image -shave 1x1 -bordercolor somecolor -border 1 result
For new users, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli