cronshot-imagemagick CronShot 中间件

程序名称:cronshot-imagemagick

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

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
});

cronshot-imagemagick 官网

https://github.com/yahoo/cronshot-imagemagick

相关编程语言

BlazeDS 是一个基于服务器的Java 远程控制(remoting...
OVal 是一个可扩展的Java对象数据验证框架,验证的规...
Volta 是一套开发工具,专为开发分布式、实时系统应...
OpenDDS 是一个开源的 C++ 实现的 对象管理组织 OMG...
JADE (Java Agent DEvelopment Framework) 是一个完...
FastMM ,在D2006和2007中已代替了原来的内存管理器。