shell提示设置
ssh初学

scrot 抓图

流浪 posted @ 2007年8月05日 03:42 in linux with tags software scrot , 2824 阅读

废话少说,先看手册

[dr@myhost ~]
 $~ man scrot

  1. 名称
  2.     scrot -使用 imlib2 的截图工具
  3.  
  4. 概要
  5.     scrot [options] [file]
  6.  
  7. 描述
  8.     scrot 是一个使用 imlib2 库截取屏幕和保存图像的的工具。
  9.     选项 [file] 指定截图保存的文件名。 如果 [file] 没有指定,
  10.     截图就会以当前的日期和时间为文件名保存在当前目录中。
  11.  
  12. 选项
  13.     -h, --help
  14.         显示帮助并且退出
  15.     -v, --version
  16.         显示版本信息并且退出
  17.     -b, --border
  18.         当选择一个窗口时,同时包含窗口边框。
  19.     -c, --count
  20.         延时时的显示倒计时
  21.     -d, --delay NUM
  22.          延时 NUM 秒
  23.     -e, --exec APP
  24.         对保存的图像执行程序 APP
  25.     -q, --quality NUM
  26.         图像质量 (1-100) 值大意味着文件大, 压缩率低。
  27.     -m, --multidisp
  28.         对多个显示设备分别截图并且连接在一起。
  29.     -s, --select
  30.         用鼠标交互式的选择一个窗口或者区域。
  31.     -t, --thumb NUM
  32.         同时生成缩略图。 NUM 是缩略图的百分比。
  33.  
  34. 说明符
  35.     --exec 和 文件名可以使用可以被 scrot 扩充的格式说明符。有两种类型的
  36.     说明符。 '%' 前导的说明符由 strfile(2) 来解释。例程可以查看 strftile
  37.     手册。这些选项用来引用当前的日期。第二种说明符由 scort 内部解释并且
  38.     使用前缀 '$'. 可以识别的说明符如下:
  39.     $f 图像的路径/文件名 (如果在文件名中就会忽略)
  40.     $n 图像文件名 (如果在文件名中会被忽略)
  41.     $s 图像大小(字节数) (如果在文件名会被忽略)
  42.     $p 图像像素大小
  43.     $w 图像宽度
  44.     $h 图像高度
  45.     $t 图像格式
  46.     $$ 打印字符 '$'
  47.     n 打印新行 (如果在文件名中会被忽略)
  48.  
  49. 例程
  50.     scrot  '%Y-%m-%d_$wx$h.png' -e 'mv $f ~/shots/'
  51.     这个命令将会创建一个以 2000-10-30_2560x1024.png 命名的文件并且把它移动到你的
  52.     shots 目录下。

常用的几个命令:

3秒后抓取整个桌面,并将图片以当前时间命名,以jpeg的格式保存在picture文件夹内

scrot ~/picture/%Y-%m-%d_$wx$h.jpeg -d 3 -c

用鼠标截取指定范围内的图片,保存以png格式,如果想给截图加上边框,可以再加上-b选项。

scrot -s ~/picture/name.png

 生成原图50%的缩略图: 

scrot -t 50% name.png

抓到图像后直接用gimp打开编辑。

scrot action.png -e 'gimp $f'
Avatar_small
wifi password hacker 说:
2023年2月08日 14:31

When we work, we use the Internet from many sources, and WiFi connections have become the most popular since they can support a big number of users at the same time. wifi password hacker But don't worry, you don't need to know how to code or use hacking tools to gain access to any WiFi network using the approach we'll teach you today.

Avatar_small
Kalvisolai TN HSC Mo 说:
2023年2月13日 16:21

TN Board Xiith Exam Syllabus 2023 all the Students who are Prepared for the Tamil Nadu Board HSC Exam 2023 Need to get the Exam Syllabus and Exam Pattern First. Students Can Download Tamil Nadu 12th Commerce, Arts, Science Sample Paper 2023. Kalvisolai TN HSC Model Paper 2024 Tamil Nadu ISC Specimen Paper 2023 Computer Science 12th Tamil Model Question Paper 2023 TN 12th Model Question Paper 2023 ISC Specimen Paper 2023 Economics TN DSE Xiith Exam Syllabus 2023 Online. Students get the Tamil Nadu Board 12th Exam Syllabus From the Official Website Also.

Avatar_small
things to do 说:
2023年12月11日 21:28

We understand the importance of staying up to date with the latest trends and hidden gems. things to do near me constantly scours the city, uncovering new attractions and upcoming events to keep our content fresh and exciting. We aim to be your constant source of inspiration, making sure you're always in the know about the hottest happenings.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter