node.js - nodejs图片库的选择
黄舟
黄舟 2017-04-17 15:03:42
0
2
719

需要nodejs对图片进行操作,主要包括:

裁剪 压缩 甚至获得图片所有像素的像素值等...

在网上找的话看着有不少,但不知道用着都怎么样

不知道有没有什么比较好的图片操作库?

还是说原生写比较好?

(表达能力不很强..希望经验人士指点一二

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
Ty80

The function of uploading images to generate thumbnails has been implemented using gm. You can refer to this library, but your server must be pre-installed with GraphicsMagick or ImageMagick.
http://aheckmann.github.io/gm/

小葫芦

I have had related needs when using NW.js as a client before. I have found some implementations and experienced them myself. Let me give you recommendations for the two situations.

If it is pure Node.js, I recommend a domestic images library https://github.com/zhangyuanw... It imitates JQ syntax, Chinese documentation, and does not rely on other image processing libraries.

If you are using NW.js or Electron, which can use canvas, I recommend using canvas directly to implement it. You can take screenshots, pick colors, get the pixel values ​​of all pixels, etc., and it is easy to transplant

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template