How do I add the drop shadow to any image with imagemagick to create the same effect that the screenshot on MacOS adds to screenshots when screencapture shadow is true?
Before and after pictures are to clarify the effect I am seeking.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
The following appears to work. I've done it twice -- once to show the shadow more explicitly, and then once to show the desired, finished output.
# adds the shadow convert source.png \( +clone -background black -shadow 100x40+0+16 \) \ +swap -background none -layers merge +repage output.png # adds the additional space like MacOSX convert output.png -bordercolor none -border 32 target.png
The padding on should be 20px less on the top and 20px more on the bottom; this solution is not perfect in that regard.
The OSX screenshow draws a white border around the image, including the rounded corners. I could not duplicate that.
The shadow from osx screencapture looks more blurred but I don't know how to measure the blue and calibrate the solution to that.