Page 1 of 1
adding fancy border to an image using command
Posted: 2019-01-30T07:05:13-07:00
by manit
hi,
I have a black and white image of arbitrary dimension.
I want to add curly bracket kind of border to it on all sides.
How should I go about it ?
I am looking for command line approach in which I can fill in image dimension.
Thanks .
Re: adding fancy border to an image using command
Posted: 2019-01-30T07:27:53-07:00
by snibgo
manit wrote:How should I go about it ?
Any way you want. Do you have an image for the "curly bracket kind of border"? If not, you'll need to create one. This might be a small part of the required border that is then tiled, perhaps mirror-imaging alternate tiles. Use as many tiles as you need for each side. To get good mitred corners, use an integer number of tiles on all sides.
Re: adding fancy border to an image using command
Posted: 2019-01-30T07:53:11-07:00
by manit
Sir,
please see
https://www.free-power-point-templates. ... -template/
That circular dotted border will do .
Re: adding fancy border to an image using command
Posted: 2019-01-30T08:06:03-07:00
by manit
That is - I have a text written in black on white background .
The canvas is a rectangle.
I want it to be surrounded by design on all sides .
I will take printout in black & white.
Thanks.
Re: adding fancy border to an image using command
Posted: 2019-01-30T08:15:36-07:00
by snibgo
Windows syntax:
Code: Select all
magick template_main.jpg -resize 300x300^! ..\toes.png -gravity Center -composite dotty_border.jpg
Re: adding fancy border to an image using command
Posted: 2019-01-30T08:35:58-07:00
by manit
okay .
I will try that .
I got a better image
https://pixabay.com/get/eb35b20e2af7053 ... 031234.svg
This is an svg .
I hope - i can resize it disregarding aspect ratio so that it frames the rectangular image in a better way.
Can you help me in this ?
Thanks.
Re: adding fancy border to an image using command
Posted: 2019-01-30T10:49:38-07:00
by fmw42
This last URL is not valid
Re: adding fancy border to an image using command
Posted: 2019-01-31T05:49:45-07:00
by manit
that URL expired , was working when I posted it.
Sorry about that.
Posted PNG version of that SVG as leafy.png .
So I figured it out with inputs from snibgo post
Here is my batch script for windows that takes file name as input and frames it inside bigger image (leafy.png) then resizes resultant composite to 10:7 ratio for landscape printing on A4 paper.
Leaving aside 15% on all sides of leafy.png rest gets overlaid with user fed image.
SET /P _inputname= Please enter file name without extension :
convert %_inputname%.png -resize 1173x1173! %_inputname%.png
composite.exe %_inputname%.png leafy.png -gravity Center -resize 100%%x70%%! big-%_inputname%-with-background.png
leafy.png is
https://ibb.co/hB5KSTF
Thanks.
Re: adding fancy border to an image using command
Posted: 2019-01-31T17:13:41-07:00
by anthony
Unless the picture you want to frame fits in to your 'leafy image nicely... You may want to break up leafy into sub pictures, and then add them around your picture. Something like the "picture frame" process in
http://www.imagemagick.org/Usage/thumbnails/#frame_edge
It all depends on exactly what you want.
Basically break up your problem into steps and apply the steps.