CronShot 中间件 cronshot-imagemagick
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/yahoo/cronshot-imagemagick
- 官方下载: https://github.com/yahoo/cronshot-imagemagick
软件介绍
cronshot-imagemagick 是 cronshot 中间件,通过 gm 来操作和保存 ImageMagick 处理的图片。
安装
npm install cronshot-imagemagick
示例
var cronshot = require('cronshot'),
middleware = {
'imagemagick': require('cronshot-imagemagick')
};
// Image Magick Example
// --------------------
// Takes a screenshot of sports.yahoo.com,
// and converts the screenshot to be a transparent image using Image Magick
// Image Magick example
cronshot.startCapturing({
// The webpage URL that you would like to take a screenshot of
'url': 'http://sports.yahoo.com',
// The local path where you would like to save the image
'path': __dirname,
// Only takes one screenshot
'cronPattern': false,
// What middleware functions to use each time a screenshot is taken
'saveMiddleware': [{
// Function that does all the Image Magick stuff
'middleware': middleware.imagemagick,
'options': {
'gmCommands': [{
'method': 'trim',
'args': []
}, {
'method': 'transparent',
'args': ['#FFFFFF']
}]
}
}]
}, function(err) {
// optional callback function once all screenshots have been taken
});像计算机科学家一样思考Python (第2版)
[美] 艾伦 B. 唐尼 / 赵普明 / 人民邮电出版社 / 2016-7 / 49.00
本书以培养读者以计算机科学家一样的思维方式来理解Python语言编程。贯穿全书的主体是如何思考、设计、开发的方法,而具体的编程语言,只是提供了一个具体场景方便介绍的媒介。 全书共21章,详细介绍Python语言编程的方方面面。本书从基本的编程概念开始讲起,包括语言的语法和语义,而且每个编程概念都有清晰的定义,引领读者循序渐进地学习变量、表达式、语句、函数和数据结构。书中还探讨了如何处理文件和......一起来看看 《像计算机科学家一样思考Python (第2版)》 这本书的介绍吧!
