Borders with different sizes in different directions

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
matze2
Posts: 1
Joined: 2011-12-21T09:43:56-07:00
Authentication code: 8675308

Borders with different sizes in different directions

Post by matze2 »

Hello together!

I want to make with mogrify a border around a picture with different sizes in differnt directions. For example 10 points to the top, 20 to the bottom and 15 right and 25 to the left side. I tried the following under windwos 7:

Code: Select all

mogrify: -border 30x40!-10+5 image.jpg
It just makes 30 point in upper und lower direction and also 40 points to the sides.

I am new in working with this programm. I tried to search but I wsn't realy successfull.

Thanks for any help.

Mathias
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Borders with different sizes in different directions

Post by fmw42 »

matze2 wrote:Hello together!

I want to make with mogrify a border around a picture with different sizes in differnt directions. For example 10 points to the top, 20 to the bottom and 15 right and 25 to the left side. I tried the following under windwos 7:

Code: Select all

mogrify: -border 30x40!-10+5 image.jpg
It just makes 30 point in upper und lower direction and also 40 points to the sides.

I am new in working with this programm. I tried to search but I wsn't realy successfull.

Thanks for any help.

Mathias
Use -splice 2 (or 4) times in the same command. See http://www.imagemagick.org/Usage/crop/#splice
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Borders with different sizes in different directions

Post by anthony »

You will need to do much of the work of mogrify yourself.

You will need to first resize (thumbnail) and pad your images appropriately.
You will then need to add the border and framing.
Only then would you use mogrify to actually arrange the images into an array (something I eventually want to build into "convert" as a set of 'layout' operators, beyond simple appending.)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply