节点图像处理

Image processing with node

我正在使用 angular 6. 我的 Web 应用程序中有多个后端显示的图像 我想对图像添加一些效果,例如增加亮度和裁剪或标记并将图像更新到后端是吗可能在 angular 6 & node?

我可以改变图像的亮度但是我不明白如何在后端用我的新图像替换旧图像。

你可以使用 npm 包 ----> jimp

The "JavaScript Image Manipulation Program"

An image processing library for Node written entirely in JavaScript, with zero native dependencies.

安装 ---> npm install --save jimp

你可以使用sharp

它是 High-performance Node.js 图像处理,调整 JPEG、PNG、WebP 和 TIFF 图像大小最快的模块。

npm install sharp
const sharp = require('sharp')

link 到 Github 页