增加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 1024×768+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
转载请注明:IT运维空间 » linux » CentOS下网站截图软件CutyCapt的安装
发表评论