Page 1 of 1

Adding a rectangle with soft borders

Posted: 2013-05-09T04:29:51-07:00
by Flaschengeist
Hi all!


I'd like to add a light / white rectangle to images. The size of the rectangle depends on the size (meaning: the orientation) of my destination image. So far, I found a way to do that:

Code: Select all

convert IMG_in.JPG -auto-orient -format 'roundrectangle 400, %[fx:h-400-400], %[fx:w-400], %[fx:h-400], 80, 80' info: > rec.mvg
convert IMG_in.JPG -fill "rgba(255, 255, 255, 0.5)" -draw "@rec.mvg" IMG_out.JPG
That results in a light, semi-transparent rectangle with rounded corners, placed somewhere at the bottom of my picture. The only thing I'm missing are soft / blurred / faded / whatever you call it corners of the rectangle.
Any ideas?

Thank you in advance!
Flaschengeist

EDIT: to make it more clear:
What I have:
Image

What I want:
Image

Re: Adding a rectangle with soft borders

Posted: 2013-05-09T09:21:58-07:00
by fmw42
Draw your rectangle on to a separate image, blur it and then composite it over your other image.