I need to add borders around photos and below the photo I want to append text. However, so far I can either add borders or add text, but they don't work togeter.

What I mean is, for appending text:
convert photo.jpg -background White label:"A nice memory" -background White -gravity east -append result.jpg
This adds a white strip with text at the bottom right of the image:

and for adding border:
convert photo.jpg -bordercolor Green -border 5%x10% result.jpg

It adds a nice green border around the photo. However, if I want them together:
convert photo.jpg -bordercolor Green -border 5%x10% -background White label:"A nice memory" -background White -gravity east -append result.jpg

it first adds a border, then an extra strip of space below the lower border with text. I guess I have to explicitly tell it to have border and text together. Is this possible?
Expected:

(Important: I want the text to be right aligned with the photo as if there's no border)
Thanks!
convert input.jpg -bordercolor Green -border 5%x10% -gravity southeast -annotate +0+0 "Some text" result.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With