Blurring image edges ... sort of.

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
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Blurring image edges ... sort of.

Post by kirash4 »

In my head (and in Photoshop) I can do this in several layers, but I'm trying to get this automated in some way. Basically what I want to achieve is an image that has a blur going out towards the edges (from center), darkened around the edges and then another image overlaid. Thinking out loud, I'm guessing:

a) take original image and duplicate
b) blur the duplicate
c) create a radial gradient, same size as the image
d) use that gradient as a mask on the blurred image so the center is sharp and the edges is blurred
e) last composite the original, blurred and another image one ontop of the other to achieve the final effect

But, I have to believe that there's a much simpler, possibly faster way to do this.

Here's an original image: Image

And this is the final result I want: Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Blurring image edges ... sort of.

Post by fmw42 »

see variable blur http://www.imagemagick.org/Usage/mapping/#blur

also see my script, variableblur, at the link below
Post Reply