DEV Community

Matteo Mazzarolo
Matteo Mazzarolo

Posted on • Originally published at mmazzarolo.com on

Apply a MacOS-like drop shadow to any image

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.

Top comments (0)