前言
MacOS通过终端截屏
准备工作
首次执行命令会弹出提示,需要获取屏幕录制权限
如果之后没再弹出提示,需要手动将终端.app添加屏幕录制权限
如果终端.app没有授予屏幕录制权限,截图将只能截取桌面
截取完整屏幕并将截图文件放到当前目录下
<file>:文件路径及文件名
-C:同时捕捉光标
-d:如果出错则报错提示
1
| screencapture <file>.jpg
|
1
| screencapture -m <file>.jpg
|
截取完整屏幕并将截图文件放剪贴板
延时截取完整屏幕
<second>:延迟时间,单位秒
1
| screencapture -T <second> <file>.jpg
|
指定截图文件的格式
<type>:文件格式
png:缺省值
pdf
tiff
jpg
gif
1
| screencapture -t <type> <file>.<type>
|
截图时静音
1
| screencapture -x <file>.jpg
|
截取完整屏幕并将截图放到邮件并开始编辑
1
| screencapture -M <file>.jpg
|
开始手动选择区域截屏
1
| screencapture -i <file>.jpg
|
指定区域截屏
<x>,<y>,<width>,<height>:指定起始坐标和图片尺寸
0,0,1920,1080:截取完整屏幕
1
| screencapture -R <x>,<y>,<width>,<height> <file>.jpg
|
开始窗口模式截屏
1
| screencapture -W <file>.jpg
|
完成
参考文献
CSDN——weixin_34194317
compien
知乎——李宇