Ubuntu14.04 uses byzanz to create gif animation, and ubuntu14.04byzanz
The way to make a blog vivid is illustrated by text, and the more vivid the way is to put an animation. For example, GIF animation. For this reason, I made a special search and found a software named byzanz in Ubuntu to make GIF.
Byzanz installation:
sudo apt-get install byzanz
Byzanz has two commands:
- Byzanz-record
- Byzanz-playback
The first is video recording, and the second is used for playback.
Tutorial: Make Animated GIF Screencasts Easily With Byzanz
This is a command line tool, and you need to specify the coordinates of the video area, but you cannot be so clear, is there any good way to get the screen range of the video area? Another tool named xdotool in Ubuntu can get the current mouse position, so that you can calculate the coordinates of the video area.
Install xdotool:
sudo apt-get install xdotool
Command Line input:
xdotool getmouselocation
Move the mouse to the position you want to enter, and press enter to confirm the command, as shown below:
x:872 y:588 screen:0 window:71303347
The coordinates of x and y are known, and the parameters required by byzanz-record are obtained.
Make gif:
byzanz-record --duration=5 --x=65 --y=55 --width=300 --height=100 sk.gif
The parameters are the recording time, the starting x and y coordinates, the area width and height, and the output format.
You can view it in Firefox, and enter the following command line:
firefox sk.gif
Below is the gif generated by me:
How to insert GIF images in a CSDN blog
Finally, it is very easy to insert GIF images in the CSDN blog. Upload the GIF image to the album and obtain the image address. Upload an image in a blog and paste the address directly.