Node-gmNode.js 图像处理包
gm 是 Node.js 的 GraphicsMagick 和 ImageMagick。
常规使用:
var fs = require('fs') , gm = require('./gm'); // resize and remove EXIF profile data gm('/path/to/my/img.jpg') .resize(240, 240) .noProfile() .write('/path/to/resize.png', function (err) { if (!err) console.log('done'); }); // obtain the size of an image gm('/path/to/my/img.jpg') .size(function (err, size) { if (!err) console.log(size.width > size.height ? 'wider' : 'taller than you'); }); // output all available image properties gm('/path/to/img.png') .identify(function (err, data) { if (!err) console.log(data) }); // pull out the first frame of an animated gif and save as png gm('/path/to/animated.gif[0]') .write('/path/to/firstframe.png', function (err) { if (err) console.log('aaw, shucks'); }); // auto-orient an image gm('/path/to/img.jpg') .autoOrient() .write('/path/to/oriented.jpg', function (err) { if (err) ... }) // crazytown gm('/path/to/my/img.jpg') .flip() .magnify() .rotate('green', 45) .blur(7, 3) .crop(300, 300, 150, 130) .edge(3) .write('/path/to/crazy.jpg', function (err) { if (!err) console.log('crazytown has arrived'); }) // annotate an image gm('/path/to/my/img.jpg') .stroke("#ffffff") .drawCircle(10, 10, 20, 10) .font("Helvetica.ttf", 12) .drawText(30, 20, "GMagick!") .write("/path/to/drawing.png", function (err) { if (!err) console.log('done'); }); // creating an image gm(200, 400, "#ddff99f3") .drawText(10, 50, "from scratch") .write("/path/to/brandNewImg.jpg", function (err) { // ... });
评论
DotImage.NET图像处理包
AtalasoftDotImage是一个针对.Net开发者,功能完善的图像处理包,它为基于.Net框架开发的Windows应用程序以及基于IE的Asp.Net程序提供高级的图像处理功能。DotImag
DotImage.NET图像处理包
0
ImagingGo 图像处理包
Imaging是一个Go图像处理包,提供了基本的图像处理功能(调整大小,旋转,翻转,裁剪等),这个包基于标准的Go图像包。采用任何实现 image.Image 接口作为输入的图像类型,并返回 *ima
ImagingGo 图像处理包
0
MahotasPython图像处理
Mahotas是一个Python的图像处理库,包含大量的图像处理算法,使用C++实现的算法,处理性能相当好。示例代码:importnumpyasnpimportmahotasimportpylabim
MahotasPython图像处理
0