Answers:
您可以通过从终端执行以下命令来禁用捕获整个窗口时添加的阴影:
defaults write com.apple.screencapture disable-shadow -bool TRUE
您需要重新启动或重新启动UIServer才能使更改生效:
killall SystemUIServer
您可以通过执行以下操作撤消此首选项并重新启用阴影:
defaults write com.apple.screencapture disable-shadow -bool FALSE; killall SystemUIServer
defaults read com.apple.screencapture disable-shadow
给你The domain/default pair of (com.apple.screencapture, disable-shadow) does not exist
。因此,取消更改的更准确方法是使用defaults delete com.apple.screencapture disable-shadow
。
我知道这是一个古老的问题-但是我在搜索时永远找不到该信息(只是接受的答案中的信息可以将其全局关闭),并且每次都只能尝试随机键。
如果在单击时按住Option(在执行Cmd-Shift-4之后,将执行Space舞),则保存的屏幕截图将不会具有阴影。
我不确定这是否仅适用于Mountain Lion和更高版本。
另一种选择是使用screencapture
:
screencapture -oic
-o
禁用阴影,-i
捕获区域并将-c
图像复制到剪贴板。
这将使用5秒钟的计时器并将图像保存到文件中:
screencapture -oi -T5 /tmp/screencapture.png
运行screencapture -h
以列出所有选项:
$ screencapture -h
screencapture: illegal option -- h
usage: screencapture [-icMPmwsWxSCUtoa] [files]
-c force screen capture to go to the clipboard
-C capture the cursor as well as the screen. only in non-interactive modes
-d display errors to the user graphically
-i capture screen interactively, by selection or window
control key - causes screen shot to go to clipboard
space key - toggle between mouse selection and
window selection modes
escape key - cancels interactive screen shot
-m only capture the main monitor, undefined if -i is set
-M screen capture output will go to a new Mail message
-o in window capture mode, do not capture the shadow of the window
-P screen capture output will open in Preview
-s only allow mouse selection mode
-S in window capture mode, capture the screen not the window
-t<format> image format to create, default is png (other options include pdf, jpg, tiff and other formats)
-T<seconds> Take the picture after a delay of <seconds>, default is 5
-w only allow window selection mode
-W start interaction in window selection mode
-x do not play sounds
-a do not include windows attached to selected windows
-r do not add dpi meta data to image
-l<windowid> capture this windowsid
-R<x,y,w,h> capture screen rect
files where to save the screen capture, 1 file per screen
您还可以在OS X的任何地方使用toggle-osx-shadows禁用阴影:
git clone https://github.com/pufuwozu/toggle-osx-shadows.git;cd toggle-osx-shadows;make;mv toggle-osx-shadows /usr/local/bin;toggle-osx-shadows
另一个有用的选项是使用TinkerTool。转到TinkerTool,然后在“常规”选项卡下,您将找到一个仅在拍摄屏幕快照时禁用阴影的选项(以及其他几个相关选项):
拍摄屏幕快照时,只需按住Option键即可。