This is a simple Bash script I made to toggle the screenshot shadow on Mac computers.
Bash 2 or later macOS Mojave 10.14.0 or later
To toggle, just run the script. If it says access denied, run this command:
# You must be in the folder where you downloaded the .sh file
$ chmod +x toggleScreenshotShadow.sh
# Then run the file like this
$ ./toggleScreenshotShadow
Images from macOS defaults
With shadow:
Without shadow:
Notice how the image has scaled up? The image is scaled because the shadow taking up the pixels has been removed.