Mac OS | Exclude Shadows from Screenshots

How to disable and restore window shadows in macOS screenshots

Overview

After pressing Command + Shift + 5, press Space; the pointer changes to a camera shape, and clicking captures a window. At this time, the window shadow is included. It can look clean in some cases, but the shadow area may be unnecessary.

Exclude the Shadow

Run the following commands from [Finder] - [Applications] - [Utilities] - [Terminal].

$ defaults write com.apple.screencapture disable-shadow -bool true
$ killall SystemUIServer

Restore the Original Setting

$ defaults write com.apple.screencapture disable-shadow -bool false
$ killall SystemUIServer

Reference

https://zetawiki.com/wiki/맥_스크린샷_그림자_제외