2 Node.js轻量级跨平台图像编解码库 images
npm 地址 https://www.npmjs.com/package/node-images
var images = require("images");
images("input.jpg") //Load image from file
//加载图像文件
.size(400) //Geometric scaling the image to 400 pixels width
//等比缩放图像到400像素宽
.draw(images("logo.png"), 10, 10) //Drawn logo at coordinates (10,10)
//在(10,10)处绘制Logo
.save("output.jpg", { //Save the image to a file,whih quality 50
quality : 50 //保存图片到文件,图片质量为50
});
2 GraphicsMagick和ImageMagick用于node gm
先要安装