SOLVED - How to create a top border only?

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
User avatar
teracow
Posts: 19
Joined: 2013-04-30T02:55:12-07:00
Authentication code: 6789
Location: Brisbane, Australia

SOLVED - How to create a top border only?

Post by teracow »

Hello,

using: ImageMagick 6.8.9-8 Q16 x86_64 2016-05-05
on: OpenSUSE 13.2 64b

Is there a way to use montage or convert to add a border to my (thumbnail gallery of images) image but only on the top edge? I haven't been able to figure out how to do this on only one side of the resulting image. The examples (and my testing) all indicate that a border will be placed on opposite sides at the same time.
Last edited by teracow on 2016-06-07T21:21:27-07:00, edited 1 time in total.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: How to create a top border only?

Post by GeeMack »

teracow wrote:Is there a way to use montage or convert to add a border to my (thumbnail gallery of images) image but only on the top edge? I haven't been able to figure out how to do this on only one side of the resulting image. The examples (and my testing) all indicate that a border will be placed on opposite sides at the same time.
Try something using "-splice" like this...

Code: Select all

convert input.jpg -gravity north -background red -splice 0x24 output.jpg
User avatar
teracow
Posts: 19
Joined: 2013-04-30T02:55:12-07:00
Authentication code: 6789
Location: Brisbane, Australia

Re: How to create a top border only?

Post by teracow »

Ah, awesome! Thanks GeeMack. :)
Post Reply