DEV Community

loading...

Apply a MacOS-like drop shadow to any image

mmazzarolo profile image Matteo Mazzarolo Originally published at mmazzarolo.com on ・1 min read

The MacOS screenshot utility adds a nice drop shadow to your screenshots.

screenshot

You can apply a similar drop shadow to any image using ImageMagick.

Make sure ImageMagick is installed:

brew install imagemagick
Enter fullscreen mode Exit fullscreen mode

Then, run:

convert screenshot-without-shadow.png \( +clone -background black -shadow 80x20+0+15 \) +swap -background transparent -layers merge +repage screenshot-with-shadow.png
Enter fullscreen mode Exit fullscreen mode

That’s it!

Source: Stephen’s Java Adventures.

Discussion (0)

pic
Editor guide