欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

CentOS下网站截图软件CutyCapt的安装 博客分类: centoswebshotCutyCapt CentOSQtwebshot

程序员文章站 2024-02-13 18:10:58
...
先安装Qt47
增加qt47的下载源
vi /etc/yum.repos.d/atrpms.repo
[atrpms]
name=CentOS $releasever – $basearch – ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1

[atrpms-testing]
name=CentOS $releasever – $basearch – ATrpms testing
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1

yum update

yum install qt47
yum install qt47-devel

yum install qt47-webkit
yum install qt47-webkit-devel

安装 CutyCapt
svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
mv cutycapt/CutyCapt /usr/local/cutycapt
cd /usr/local/cutycapt
qmake
make


下载个x-server
wget http://www.flexthinker.com/wp-content/uploads/2009/11/xvfb-run.sh.txt
mv ./xvfb-run.sh.txt /usr/local/cutycapt/xvfb-run.sh
chmod u+x /usr/local/CutyCapt/xvfb-run.sh

安装中文包

yum install fonts-chinese

安装ImageMagick
yum install ImageMagick


最后就可以happy的截图了,如下:

/usr/local/cutycapt/xvfb-run.sh --server-args="-screen 0, 1024x768x24" /usr/local/cutycapt/CutyCapt --url=http://www.163.com --out=163.jpg
//convert截取第一屏
convert -crop  1024x768+0+0 /data/www/imark-image/screenshot/jVK_LBPG-a4..jpg  /data/www/imark-image/screenshot/jVK_LBPG-a4._fs.jpg
//convert缩放第一屏
convert -resize 20%x20% /data/www/imark-image/screenshot/jVK_LBPG-a4._fs.jpg /data/www/imark-image/screenshot/jVK_LBPG-a4._20_20.jpg


参考网址
http://cutycapt.sourceforge.net/
相关标签: CentOS Qt webshot