【ubuntu如何录制gif图】
0 前言
参考:视觉SLAM十四讲学习笔记——ch13 设计SLAM 系统
1 安装byzanz工具
sudo apt-get install byzanz
2 使用
2.1 首先获取窗口参数
xwininfo //获取窗口参数数据
/*
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x4600003 "MySLAM"
Absolute upper-left X: 2025
Absolute upper-left Y: 95
Relative upper-left X: 10
Relative upper-left Y: 38
Width: 1024
Height: 768
Depth: 24
Visual: 0x38
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x4600002 (not installed)
Bit Gravity State: ForgetGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +2025+95 -791+95 -791-217 +2025-217
-geometry 1024x768+2015+57
2.2 开始录制
*/
byzanz-record --help //获取帮助
/*
用法:
byzanz-record [OPTION…] 录制您的当前桌面会话
帮助选项:
-?, --help 显示帮助选项
--help-all 显示全部帮助选项
--help-gtk 显示 GTK+ 选项
应用程序选项:
-d, --duration=SECS 动画的时间 (默认:10 秒)
-e, --exec=COMMAND Command to execute and time
--delay=SECS 开始之前的延时(默认:1 秒)
-c, --cursor 录制鼠标光标
-a, --audio 录音
-x, --x=像素 要录制矩形的 X 坐标
-y, --y=像素 要录制矩形的 Y 坐标
-w, --width=像素 录制矩形的宽度
-h, --height=像素 录制矩形的高度
-v, --verbose 详细
--display=显示 要使用的 X 显示
*/
byzanz-record -d 5 -x 2025 -y 95 -w 1024 -h 768 ~/a.gif