欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

玩欧卡就用莱仕达V10方向盘欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 4653|回复: 3
收起左侧

Screenshot ---Ubuntu Linux中使用快捷键截图选定区域

[复制链接]
宁静致远 发表于 2012-7-23 16:05 | 显示全部楼层 |阅读模式
本帖最后由 宁静致远 于 2012-7-23 16:12 编辑

在WIN中,习惯了用QQ的CTRL-ALT-A来截取指定区域的截屏了,确实方便好用,不过在UBUNTU中,可以使用gnome-screenshot 来完成类似的功能——当然,截屏编辑等功能是没有的。

  首先,打开“系统设置”中的“键盘”,在其中的“快捷键”中添加新的自定义快捷键。

  名称输入任何你喜欢的名称,比如“截屏”,命令输入:
gnome-screenshot -a
注:gnome-screenshot用法:
用法:
  gnome-screenshot [选项...] 对屏幕截图

帮助选项:
  -h, --help                   显示帮助选项
  --help-all                   显示全部帮助选项
  --help-gtk                   显示 GTK+ 选项

应用程序选项:
  -c, --clipboard              将截图直接发送到剪贴板
  -w, --window                 抓取窗口,而不是整个屏幕
  -a, --area                   抓取屏幕的一个区域,而不是整个屏幕
  -b, --include-border         抓图中包含窗口边框
  -B, --remove-border          去除屏幕截图的窗口边框
  -d, --delay=秒               在指定延迟后抓图[以秒计]
  -e, --border-effect=效果     添加到边框的特效(阴影 shadow 、边框 border 或无特效 none)
  -i, --interactive            交互式设定选项
  --display=显示               要使用的 X 显示
点击应用之后,就出现了一条新的快捷命令,但还处于“禁用”状态,点击“禁用”,会显示为“新建快捷键...”,然后按下你希望用的快捷键,比如 CTRL-ALT-A。

  这样,就可以了,你现在按下CTRL-ALT-A试试?

  (有时候,这个快捷键会失效,有可能是这个快捷键在其它应用中也被使用了,可以修改为其它的快捷键;另外,按下快捷键时候要用力哦,稍微多按一会,等鼠标光标变成十字即可,似乎机器反应比较慢,呵呵。)

  此外,如果你希望按下快捷键时,可以选择是否包括鼠标指针,是否延时等,可以在参数里面使用 -i 来调出交换设置界面。

  最后,多说一句,gnome-screenshot命令已经默认绑定了快捷键 PrntScr 了,直接按这个会截取全屏;而ALT-PrntScr是截取当前窗口。
 楼主| 宁静致远 发表于 2012-7-23 16:14 | 显示全部楼层
还可以为import命令设置快捷键:
Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP   

Usage: import [options ...] [ file ]

Image Settings:
  -adjoin              join images into a single multi-image file
  -border              include window border in the output image
  -channel type        apply option to select image channels
  -colorspace type     alternate image colorspace
  -comment string      annotate image with comment
  -compress type       type of pixel compression when writing the image
  -define format:option
                       define one or more image format options
  -density geometry    horizontal and vertical density of the image
  -depth value         image depth
  -descend             obtain image by descending window hierarchy
  -display server      X server to contact
  -dispose method      layer disposal method
  -dither method       apply error diffusion to image
  -delay value         display the next image after pausing
  -encipher filename   convert plain pixels to cipher pixels
  -endian type         endianness (MSB or LSB) of the image
  -encoding type       text encoding type
  -filter type         use this filter when resizing an image
  -format "string"     output formatted image characteristics
  -frame               include window manager frame
  -gravity direction   which direction to gravitate towards
  -identify            identify the format and characteristics of the image
  -interlace type      None, Line, Plane, or Partition
  -interpolate method  pixel color interpolation method
  -label string        assign a label to an image
  -limit type value    Area, Disk, Map, or Memory resource limit
  -monitor             monitor progress
  -page geometry       size and location of an image canvas
  -pause value         seconds delay between snapshots
  -pointsize value     font point size
  -quality value       JPEG/MIFF/PNG compression level
  -quiet               suppress all warning messages
  -regard-warnings     pay attention to warning messages
  -respect-parentheses settings remain in effect until parenthesis boundary
  -sampling-factor geometry
                       horizontal and vertical sampling factor
  -scene value         image scene number
  -screen              select image from root window
  -seed value          seed a new sequence of pseudo-random numbers
  -set property value  set an image property
  -silent              operate silently, i.e. don't ring any bells 
  -snaps value         number of screen snapshots
  -synchronize         synchronize image to storage device
  -taint               declare the image as modified
  -transparent-color color
                       transparent color
  -treedepth value     color tree depth
  -verbose             print detailed information about the image
  -virtual-pixel method
                       Constant, Edge, Mirror, or Tile
  -window id           select window with this id or name

Image Operators:
  -annotate geometry text
                       annotate the image with text
  -colors value        preferred number of colors in the image
  -crop geometry       preferred size and location of the cropped image
  -encipher filename   convert plain pixels to cipher pixels
  -geometry geometry   preferred size or location of the image
  -help                print program options
  -monochrome          transform image to black and white
  -negate              replace every pixel with its complementary color 
  -repage geometry     size and location of an image canvas
  -quantize colorspace reduce colors in this colorspace
  -resize geometry     resize the image
  -rotate degrees      apply Paeth rotation to the image
  -strip               strip image of all profiles and comments
  -thumbnail geometry  create a thumbnail of the image
  -transparent color   make this color transparent within the image
  -trim                trim image edges
  -type type           image type

Miscellaneous Options:
  -debug events        display copious debugging information
  -help                print program options
  -list type           print a list of supported option arguments
  -log format          format of debugging information
  -version             print version information

By default, 'file' is written in the MIFF image format.  To
specify a particular image format, precede the filename with an image
format name and a colon (i.e. ps:image) or specify the image type as
the filename suffix (i.e. image.ps).  Specify 'file' as '-' for
standard input or output.
 楼主| 宁静致远 发表于 2012-7-23 16:22 | 显示全部楼层
发现落伍了。上面的工作不用在做了,ubuntu12.04已经默认有那些快捷键了,当然想自定义还是可以的。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
 楼主| 宁静致远 发表于 2012-7-23 16:37 | 显示全部楼层
可以定义gnome-screenshot -a -c,直接发送到剪贴板,适合word文档编写时复制图片

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-4-20 16:23 , Processed in 0.048836 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表