Hi!
I'm trying to take a bunch of images, resize them to 425x283 and then add a black asymmetric border to them to make the final images 450x413 with the image in the center of the final image.
So far, using the Mogrify -thumbnails 425x283 does a good job getting them to size. But I really don't know how to get a border around them that's +25+130 ... Using the -border function won't work because it's symmetrical... unless I crop the image after... I really don't know
Thanks
Asymetric border
Asymetric border
François
Re: Asymetric border
You could try adding -background white -gravity center -extent 450x413 to your command
You should be able to do it with the border command see: https://www.imagemagick.org/script/comm ... php#border
You should be able to do it with the border command see: https://www.imagemagick.org/script/comm ... php#border
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Asymetric border
In addition to Bonzos suggestion (which is likely the best)
You can composite the image into a constant size black background with mogrify. See http://www.imagemagick.org/Usage/basics ... fy_compose. Probably use over rather than dst_in. See the -gravity to center.
Alternately, you can use multiple splice commands to add some amount to each of the four sides. See http://www.imagemagick.org/Usage/crop/#splice
You can composite the image into a constant size black background with mogrify. See http://www.imagemagick.org/Usage/basics ... fy_compose. Probably use over rather than dst_in. See the -gravity to center.
Alternately, you can use multiple splice commands to add some amount to each of the four sides. See http://www.imagemagick.org/Usage/crop/#splice
Re: Asymetric border
Well... that was fast and easy!
Thanks a million.... somehow I just kept taking the hard route...
Now, I'm off to step two, putting them into a grid using the montage function
Thanks a million.... somehow I just kept taking the hard route...
Now, I'm off to step two, putting them into a grid using the montage function
François