
node.js实现快速截图?
使用nodejs进行截图,推荐使用phantomjs实现。phantomjs是一个无头浏览器,能够实现截屏,网络请求监测,自动化测试等功能。具体所有例子可以在phantomjs官网找到,下面给一个官网截屏的实例: // index.jsvar page = require('webpage').create();page.open(', function() { page.render('github.png'); phantom.exit();});// 命令行调用phantomjs index.js通常也会用casperjs(webkit)来实现截图,它有更好用的api封装方便实现各种操作
