I'm trying to do something simple, or what would seem to be simple... but for the life of me I can't figure out the proper command line to get it done. What I want to do is add a 1px black border around an image, but I want to add this "border" to the inside of the image so as not to change the overall dimensions of the original image.
For a standard border, I know that I can use "mogrify -bordercolor black -border 1 *" to process all images in a specific directory, or I could also use the "convert -border" command to do the same. But both of these commands add 1px to each side of the image, thereby making a 100x100 image now 102x102 I have figured out that I will need to use the stroke command rather then border to accomplish what I'm looking to do.
I've tried the following:
Code: Select all
convert -stroke black -strokewidth 1 test.jpg testnew.jpg
Ideally I would like to find a stroke command that simply adds the 1px black border to all images in a directory, regardless of size dimensions of the input image. My test environment is Imagemagick for Windows and batch files, but I will be using the same on a Unix machine once I figure out the correct command.
Any help on this is appreciated.