Search code examples
imagemagick

How to add inner shadow to image using imagemagick?


I need to add inner shadow to image using imagemagick convertor like shown in the image below, can someone guide me enter image description here


Solution

  • You can do that in Imagemagick by creating a white image, then blurring it. Then multiply it by the input.

    Unix Imagemagick 6 syntax:

    Input:

    enter image description here

    convert barn.jpg \
    \( +clone -fill white -colorize 100 -virtual-pixel black -blur 0x10 \) \
    -compose multiply -composite barn_inner.jpg
    

    enter image description here